Hi, I am just a newbie to shadergraph and
I just dont understand the how 2d sample texture works! (UV(2) Input)
just as the screengrab that I attached, I have put a small white round texture as texture input, and
Voronoi node as a UV input. and the I just couldnt figure out on how the result texture is being produced.
the document says mesh normal and honestly, I dont know what this exactly means.
Could anyone tell me how UV(2) texture input works?
UV is a 2-dimensional value which is used when you sample a texture, basically 2D coordinates where to read your image you are sampling. So, if you take the UV input and modify it with some math, you can effectively distort the image you sample.
I blended a noise to the both channels (xy/UV) of the undistorted UV coordinates by using Lerp function. So it’s about 80% the default linear UV and 20% effect of the noise. You can see how the UV is slightly discolored now on the right Lerp node, where you see the green and red UV space visualized. Now you can see that the checkerboard texture that would be normally very linear along X and Y axis is deformed.
Just for clarity, here’s the checkerboard texture without any deformation: