- Home /
Shaders: 2 textures down to 1 - different Tiliing
I've written a shader which takes 2 identical textures, which I'm sure isn't the best way to do things. Is there some method where I can just use the texture once, and alter the tiling inside the shader?
My Material settings are as follows:- Texture 1: Tiling x=0.99 y=0.99, Offset x=0 y=0 Texture 2: Tiling x=1 y=1, Offset x=0 y=0 (Both textures are an identical image)
Comment
I'm 99% sure that the graphics manager doesn't actually load the texture twice. It attempts to load the second (just like this was a new $$anonymous$$aterial) and says "oh, I already have that one."
Are you using ShaderLab, or a real surface/frag shader? In frag shaders you can easily add *2
or `+0.5' to the second texture lookup.