Code (csharp): Shader "Rotating UV" { properties { _MainTex ("Base (RGB) Transparency (Ambient)", 2D) = "" {}} SubShader { Pass { Tags {"Queue" = "Transparent" } Blend SrcAlpha OneMinusSrcAlpha Material { Diffuse (1,1,1,1) Ambient (1,1,1,1) } Lighting On SetTexture [_MainTex] { matrix [_Rotation] combine texture * primary double, texture } } } } this is a shader that someone in the IRC created for me. it works along with a script to rotate a material according to mouse input. All i need now is for black to be transparent. i tried adding some code, as you all can see, but the black is only a very, very, small amount transparent. can someone fix it up for me? thx
Your shader doesn't do that at all. If you see black as transparent with that, it's because your brain and eye connection is wonky. Also, "Transparency (Ambient)" doesn't make any sense. You need to decide what you actually want to do. You're talking about additive blending. But additive blending is going to let the background through everywhere. So if that's not what you want, use what you had to begin with, and make a better alpha channel. Also, please try to make an attempt at formatting. Code (csharp): Shader "Additive Blend, Rotating UV" { Properties { _MainTex ("Texture (RGBA)", 2D) = "" } SubShader { Tags {Queue = Transparent} Blend One One Lighting On Material { Diffuse (1,1,1) Ambient (1,1,1) } Pass { SetTexture [_MainTex] { Matrix[_Rotation] Combine texture * primary Double } } } }