Please,
see picture, these are most simple shader setups.
In forward mode the sphere renders correct behind the terrain, in deferred is doesn’t.
What could be going wrong here or what may I forgot to add to have the blue sphere also rendered in background in deferred mode?
It is not a shader forge issue though - it seems Deferred ignores render queue settings for any shader (certainly the background tag) - I can not make a simple shader render an object before everything else in deferred like in forward mode - it must be physically positioned behind.
There is no info about this in the docs so I hope someone can come forward and explain.
A workaround might be to alter the vertex z values in the shader while still rendering at same size on screen but I don’t know how to achieve that…
Might be a custom render queue issue. Unity likes to set the value on materials now when it really should not.
Select the material in the editor. Right click on the inspector tab and select “debug”. Set the Custom Render Queue to -1.