Shader Graph clamp texture loop

Hello there, dear Unity Developers,

I’ve been trying all day but I can’t seem to find a way to have my texture not loop whenever I increase the tiling.
In my case I would like to be able to live-scale a 2D Texture with a simple image on it, without it looping, thus duplicating the image all over the UV.

I hope my problem is comprehensible, and I am looking forward to any kind of help.

Cheers

2 Likes

You can set the repeat mode to clamp on the import settings of your texture.
The other option is to make a SamplerState node in your SG and set the Wrap mode on it to “Clamp” and plug that into your Sample Texture 2D node’s “Sampler” input.

7 Likes

THANK YOU! I’ve spent a week looking for the answer to this. Ive been following tutorials for unlit shaders through shader graph and they all skip this step. Their graphs seemed to work without it. It was so frustrating…

Thanks for the answer!

1 Like