I have a Transparent shader that usually wouldn’t write to the depth buffer, except I want to outline it and because it is transparent i need to use edge detection using the Depth Buffer, so I changed ZWrite to On and ZTest to Always so it would keep its transparency, and while the shader displays the same as before, when I read the depth buffer it does not appear to be writing to it, so I cant find any edges (with another shader in a Blit function).
Shader Originally (ZWrite Off):
Shader w/ ZWrite On:
DepthBuffer Originally:
DepthBuffer w/ Zwrite On:
I don’t seem to understand the Depth Buffer correctly, as I’m not sure whats going on or how to fix it.