Skip to content

Instantly share code, notes, and snippets.

@weshardee
Last active April 24, 2016 17:08
Show Gist options
  • Save weshardee/936761df11b082079babad88be3800b3 to your computer and use it in GitHub Desktop.
Save weshardee/936761df11b082079babad88be3800b3 to your computer and use it in GitHub Desktop.
// Flat planes (quads) with textures that have transparency. For example UI elements and/or 2D sprites.
Shader "2D/Texture Only Alpha"
{
Properties
{
_MainTex ("Texture", 2D) = ""
}
Category
{
ZWrite Off
Tags {"Queue" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
SubShader
{
Pass
{
SetTexture[_MainTex]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment