- Home /
Render to GBuffer in command buffer
Hi,
I'm trying to render some models to GBuffer in command buffer by calling DrawMeshInstanced so that I can get more stable instancing.
It works when there are other objects in the background but breaks when the background is sky/clear color. It seems that the color and normal data are cleared by Unity later in the pipeline. But the depth is still there. I tried changing blend mode, depth mode, etc but none of them helps. This only happens to the objects I rendered by mannually adding drawcalls to command buffer. They look fine if I just drag them into the scene. Does anyone have any idea about how to fix it?
Comment