Hi,
I’m trying to create a simple shader that draws its geometry on top of everything else. Here’s where I am.
Shader "Custom/Unlit ZtestAlways" {
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader {
Tags { "Queue"="Overlay" "IgnoreProjector"="True" "RenderType"="Transparent"}
LOD 200
ZTest Always
CGPROGRAM
#pragma surface surf Lambert
sampler2D _MainTex;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D (_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
FallBack "Diffuse"
}
I have it in the overlay queue, so the rest of the scene (terrain) should be rendered already, I would have though. ZTest is set to Always. The geometry using this shader still gets obscured by the landscape. Note that i’ve not put any Alpha blending in yet as I am just testing the ztest.
Must be something dead obvious, does anyone have any thoughts?
Thanks,
/Mike