I am trying to write a shader with that uses 2 masks, one which rotates using a matrix. Although I can get one mask to work like this tutorial http://www.youtube.com/watch?v=jlcOzb2jCbg&list=UUqkCSwxg2LUkhM0-7M79c9Q&index=5, the second (non rotating) mask breaks the whole shader! What am I doing wrong? Any help would be greatly appreciated
Shader “ShaderLab Tutorials Me/Spinner”
{
Properties
{
_MainTex (“Main Texture”, 2D) = “”
_MaskTex (“Mask (RGBA)”, 2D) = “”
_MaskTex2 (“Mask2 (RGBA)”, 2D) = “”
}
SubShader
{
Tags {“Queue”=“Transparent”}
Lighting Off
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
BindChannels
{
Bind “vertex”, vertex
Bind “texcoord”, texcoord0
Bind “texcoord1”, texcoord1
}
Pass
{
SetTexture[_MaskTex] {Matrix[_RotateMatrix]}
SetTexture[_MainTex] {Combine previous + texture}
SetTexture[_MaskTex2] {Combine previous + texture} // I think this is where the issue is
}
}
}