- Home /
How to draw on top of a shader applied to camera
Hello,
I got a shader applied directly to the camera (used for Fog of War). I would like some object shader to be able to draw themself on top of that shader.
I'm a bit new to shader programmation. I tried messing with ZTest/ZWrite and "Queue" tag but nothing allowed my shader to render on top of that Camera/Fow shader : /
My FoW shader use:
SubShader
{
Pass
{
ZTest Always
Cull Off
ZWrite Off
Fog { Mode off }
CGPROGRAM
frag/vert function blabla
ENDCG
}
}
My object shader use:
SubShader
{
Tags{ "Queue" = "Overlay+1" }
Pass
{
ZTest Always
Cull Off
ZWrite Off
Fog { Mode off }
CGPROGRAM
frag/vert function blabla
ENDCG
}
}
Disabling [ZTest Always], [Cull Off], [ZWrite Off] or [Fog { Mode off }] on the FoW shader didn't helped, the object shader is still invisible
Any idea, input ? (Would be greatly appreciated =^) )
Comment