Texturing clamping in Shader Graph?

Hey guys, I’m trying to work out how to clamp my textures in Shader Graph. I’m not the most educated in node graphs so there is probably something very simple I am missing but i was hoping you could help me. So far I’ve tried connecting a ‘Tiling and Offset’ nodes into my Sample 2D texture node and then then have that connected into a clamp node. This is probably isn’t the clamp node i’m expected to use. If you need any more info, i’ll add or describe what I can. Thanks again :slight_smile:

Not sure what you are aiming for exactly.

You can play with the nodes found in the range topic, especially Clamp, Fraction and Saturate.
https://docs.unity3d.com/Packages/com.unity.shadergraph@5.6/manual/Math-Nodes.html#range

Two other very useful nodes for playing with the range are Lerp and Smoothstep.
https://docs.unity3d.com/Packages/com.unity.shadergraph@5.6/manual/Math-Nodes.html#interpolation

And If you mean wrap_around/repeat for textures that is meta data saved on the texture (in your project) itself and not the shaders

1 Like