Last active
August 29, 2015 14:01
-
-
Save lucabelluccini/4fecfd1bd80d161ac62b to your computer and use it in GitHub Desktop.
Self Lit, Alpha channel (global), Texture mapped to UV, Mask mapped to UV2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/Shader4S" { | |
Properties { | |
_MainTex ("Texture", 2D) = "white" { } | |
_Mask ("Mask", 2D) = "white" {} | |
_Alpha ("Alpha", Range(0.0,1.0)) = 1.0 | |
} | |
SubShader { | |
Tags { Queue = Transparent } | |
ZWrite Off | |
Blend SrcAlpha OneMinusSrcAlpha | |
Pass { | |
BindChannels { | |
Bind "Vertex", vertex | |
Bind "texcoord", texcoord1 | |
Bind "texcoord1", texcoord0 | |
} | |
SetTexture [_Mask] {combine texture} | |
SetTexture[_MainTex] { | |
combine texture, previous * texture | |
constantColor(0,0,0,[_Alpha]) | |
combine texture, previous * constant | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment