hi,
i noticed that the zbuffer is not cleared after a renderpass, independent of the used ClearScreenMode. could we have a setting for that?
i'm trying to render a scene with large differences in size (far away planets and close small things on the surface of one planet), and i tried to achieve this with two renderpasses (a first pass with large values for the near & far clipping plane, a second pass with smaller values). sometimes the large objects intersect the small ones even though they are rendered in different passes.
Z-Buffer Clear on Renderpass?
Moderator: Moderators
Z-Buffer Clear on Renderpass?
- Attachments
-
- multiz v01.zgeproj
- move mouse up & down to translate the big planet over the z-axis
- (2.03 KiB) Downloaded 542 times
Hi diki,
Would be nice to have a separate flag for clearing the Z-Buffer yes. There are however a number of solutions for what you're trying to do already.
- Rely on "DepthSorted" entirely and disable the Z-Buffer for the Materials in your first pass.
- Render the first pass to a RenderTarget and use this as background in your second pass.
- Push the z-depth value of objects in the first pass back using a shader.
K
Would be nice to have a separate flag for clearing the Z-Buffer yes. There are however a number of solutions for what you're trying to do already.
- Rely on "DepthSorted" entirely and disable the Z-Buffer for the Materials in your first pass.
- Render the first pass to a RenderTarget and use this as background in your second pass.
- Push the z-depth value of objects in the first pass back using a shader.
K