Depth buffer is not preserved when post-processing is enabled #10237
lucasleandro1805
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Depth buffer is not preserved when post-processing is enabled
When rendering a scene with post-processing enabled, Filament does not preserve the camera framebuffer's depth buffer after the render pass.
This makes it impossible to reliably use the scene depth for subsequent rendering operations, custom effects, compositing, or integration with external rendering systems.
Is this behavior intentional? If so, what is the technical reason for not preserving or exposing the final depth buffer when post-processing is active?
This is a significant limitation for more advanced rendering workflows. Many effects and integrations depend on having access to the depth generated by the main camera render, including:
Currently, disabling post-processing may preserve the expected depth behavior, but that is not a practical solution because it also disables important visual features provided by Filament.
Would it be possible to preserve the camera depth buffer, expose the resolved depth texture, or provide an API option that allows developers to retain it after post-processing?
This would be an extremely valuable feature and would remove a major limitation for developers using Filament as part of a larger rendering pipeline.
All reactions