- Home /
Scrolling Texture scrolls both maps. Only want single map to scroll?
Hello, I have a script to scroll my texture but in my material i have a main texture with transparency and a separate texture as an independent greyscale alpha. However, it is scrolling both textures together and I don't want that.
I want my main texture to scroll and appear to fade at the top. but the fade I have made scrolls with the main texture.
var ySpeed : float;
var xSpeed : float;
function LateUpdate ()
{
var offset = Time.time * ySpeed;
var offset2 = Time.time * xSpeed;
renderer.material.SetTextureOffset ("_MainTex",Vector2(offset2, -offset));
}
Comment
Hey, could you post the shader you're using?
I can imagine why this might be happening (indeed, in many cases it's probably desired behaviour), but it depends on what the shader's doing.