Hi, I’m trying to make a shader for 3d objects that behave as 2D Overlay GUI elements. I’m almost finished, except that light flares seem to add to my GUI’s brightness. I’d like for my GUI to be like a GUITexture in that the GUITexture isn’t affected by flares and is always drawn last. How do I simulate this with my custom shader?
Here’s the code I have so far:
Shader "Mobile/GUI/Health Rings"
{
Properties
{
_MainTex ("Texture (RGBA)", 2D) = "white" {}
_Cutoff ("Alpha Slider", Range (0.011, 1)) = 0.5
}
SubShader
{
Tags { "Queue"="Overlay+1" "IgnoreProjector"="True" }
AlphaTest GEqual [_Cutoff]
Lighting Off
ZTest Always
ZWrite Off
Fog { Mode Off }
Pass
{
SetTexture [_MainTex]
}
}
}
Thanks in advance!