- Home /
How to scale a texture in a shader without tiling?
I need to write a shader that allows me to change how a texture is displayed in a game object's mesh by adjusting some parameters. I've already thought in change the texture UV values, and move a texture is not a problem, but I could not scale it without a tiling effect, which is not desired. For my needs the texture must not repeat along the mesh when I scale it down. Any suggestions?
To be more clear, look at the image, that shows the same plane with the same texture, but with different parameters values.
Answer by ricardo_arango · Jan 21, 2015 at 11:13 AM
Try setting the wrap mode of the Texture to Clamp: http://docs.unity3d.com/Manual/class-TextureImporter.html
For some reason I forgot of the wrap mode existence. $$anonymous$$y sincere thanks! Thumbs up to you, problem solved.
hey, i came across this and i'm having the same problem. what did you use to change the parameters for the scaling? i can't seem to figure it out