Search Unity

Question UV Tiling & Offset input values from World Position - incorrect behaviour?

Discussion in 'Shader Graph' started by Xepherys, Aug 24, 2020.

  1. Xepherys

    Xepherys

    Joined:
    Sep 9, 2012
    Posts:
    204
    I'm using ShaderGraph in 2020.1.0f1. I have some shader experience, but it's all been handwriting shaders. I have experience with node-based things of this nature by way of Substance Designer. I'm working on a shader that should allow for seamless visibility between quads by changing the UV offset of a noise pattern based on the world position of the quad.

    That said, I'm running into two things. This short (0:05) video shows how I'm expecting this to work - as the X/Y values of the UV Offset are changed, the continuous flow of the noise is smooth.



    So, I add a position node and a split node, feed the world position into the split, and feed R/G from the split to X/Y of the Vector2 node. That does two things: it makes the preview boxes 3D (becomes a sphere instead of a quad), and "expands" the apparent tiling:



    I'm guessing this is because the value from the split is a Vector1 rather than a float, though it seems odd that there's no implicit conversion, or that Vector1 values applied to UV Offset would change the actual appearance.

    So, is this due to it being a Vector1 rather than a float? If so, is there a node that can convert from Vector1 to float? Am I going about this the wrong way entirely?
     
    Sypwer likes this.