In the material editor there is a handy “Pixel Depth Offset” parameter. I want to use it to re-create what is shown in the following picture.
Currently I can push stuff back using positive values and it pretty much does what is shown above. There is a problem though. It messes up all shadows. My intuition tells me that shadows are calculated using the depth buffer after alteration, and because of that you end-up with shadows that are offset and therefore do not match the geometry of the scene.
It seems to me that a solution would be to implement a flag for ignoring the Pixel Depth Offset in the shadow calculation. But maybe these is already some existing solution that I don’t know about. Thanks for your help.