Last active
April 24, 2016 17:09
-
-
Save weshardee/fa19284b53bf5441ea38190b67d7d919 to your computer and use it in GitHub Desktop.
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
// Flat planes (quads) with textures that have transparency and need to be colored or faded. Combine with iTween animations for extremely smooth looking, fading UI elements! :) | |
Shader "2D/Texture Color Alpha" | |
{ | |
Properties | |
{ | |
_Color ("Color Tint", Color) = (1,1,1,1) | |
_MainTex ("Texture", 2D) = "" | |
} | |
Category | |
{ | |
ZWrite Off | |
Tags {"Queue" = "Transparent" } | |
Blend SrcAlpha OneMinusSrcAlpha | |
SubShader | |
{ | |
Pass | |
{ | |
SetTexture[_MainTex] {Combine texture * constant ConstantColor[_Color]} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment