Shader "TextureMaskMultiply"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_Mask ("Culling Mask", 2D) = "white" {}
_Cutoff ("Alpha Cutoff", Range (0,1)) = 0.1
}
SubShader
{
Tags {"Queue"="Transparent"}
Lighting Off
ZWrite Off
Color [_Color]
AlphaTest GEqual [_Cutoff]
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
SetTexture [_Mask] {
constantColor [_Color]
combine texture * constant
}
SetTexture [_MainTex] {
combine previous * texture
}
}
}
}