Last active
August 29, 2015 14:23
-
-
Save yasuakiohama/23be05060d96b91310ff to your computer and use it in GitHub Desktop.
MaskedTexture
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 "MaskedTexture" | |
{ | |
Properties | |
{ | |
_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 | |
Blend SrcAlpha OneMinusSrcAlpha | |
AlphaTest GEqual [_Cutoff] | |
Pass | |
{ | |
SetTexture [_Mask] {combine texture} | |
SetTexture [_MainTex] {combine texture, previous} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment