Skip to content

Instantly share code, notes, and snippets.

@N-Carter
Created August 7, 2011 13:32
Show Gist options
  • Save N-Carter/1130376 to your computer and use it in GitHub Desktop.
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
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