- Home /
Vertical or Horizontal texture wrapmode
Hi, quick question. Is it possible to wrap the same texture in two different ways? So basically, can I repeat my texture horizontally, while clamping it vertically?
Or is there any other way to achieve this manually, like stretching the bottom pixel of said texture downwards?
Answer by Owen-Reynolds · Sep 09, 2013 at 11:54 PM
1) Yes. Graphics cards have settings to set a different wrapMode in each direction.
2) Not in Unity. The wrapMode dropdown just doesn't have them.
I believe the wrapMode is officially part of the shader (and not the texture, as the dropDown implies. But in practice any texture is wrapped/clamped the same everywhere.) So you might be able to set U=wrap/V=clamp in the shader, but never tried it and Unity may override (say, in a surface shader) or not process those Cg commands.
Thanks for your reply. I gave the shader a spin, but didn't get it to work yet.