Created
August 7, 2011 13:32
-
-
Save N-Carter/1130376 to your computer and use it in GitHub Desktop.
Shader that gets its colour from a property and its alpha from a texture
This file contains hidden or 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 "Mine/Unlit Alpha" | |
{ | |
Properties | |
{ | |
_Color ("Tint", Color) = (1,1,1,1) | |
_MainTex ("Texture", 2D) = "white" {} | |
} | |
SubShader | |
{ | |
Lighting Off | |
Cull Off | |
ZTest Always | |
Zwrite Off | |
Fog {Mode Off} | |
Tags {"Queue" = "Transparent"} | |
Pass | |
{ | |
Blend SrcAlpha OneMinusSrcAlpha | |
SetTexture [_MainTex] | |
{ | |
ConstantColor[_Color] | |
Combine constant, texture | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment