- Home /
Upsidedown depth buffer? (SRP/MRT)
I came across a really weird problem with my deferred SRP - the depth buffer is inverted on Y axis. So, first things first, this problem only occurs in game view. Scene view and camera preview work correctly (which makes this even more confusing). My currently very basic deferred data shader writes to 3 render textures (`CommandBuffer.SetRenderTarget(RTs as colors, CameraTarget as depth)`), when I blit those textures to my camera's color render texture their orientation is correct (up is up, down is down), however, after rendering the skybox I've realised that the depth buffer is wrong, plane that is physically on the bottom is cutout from skybox at the top. I could fix this by inverting my Gbuffers first, then entire frame (but that complicates forward pass integration) or alternatively, invert my VP matrix somehow, but this sounds really unnecesary, especially that scene camera doesn't have this problem. Ideas?
Your answer
Follow this Question
Related Questions
commandbuffer can't get depth buffer in forward rendering but correct in Deferred .Why? 1 Answer
Is there a way to write to Deferred Depth from a command buffer in CameraEvent.AfterImageEffects? 1 Answer
How to get depth texture and render texture from one camera 0 Answers
Writing to RWTexture3D using a pixel shader without using Graphics.Blit 0 Answers
Irregular shape window to a different background world? 0 Answers