GUI Shader?

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!

im not very familiar with this way but you can use layers and ignore certain layers on some things. I only used it once. you could look into that

Nope, that doesn’t help. My GUI has to be drawn after everything else, and the lens flares seem to be drawn right after. Is there a way to fix that in a shader, or something?

Yep that works! Thanks, I’m amazed I didn’t think of that. I thought that there would be a way to do it in shaderlab though. But multiple camera’s is ok.