Make the occlusion culling debug draw mode draw a translucent overlay#79733
Make the occlusion culling debug draw mode draw a translucent overlay#79733Calinou wants to merge 2 commits intogodotengine:masterfrom
Conversation
34195cf to
63a59c9
Compare
|
I think this is a useful change, especially since the jittered buffer makes it very difficult to see the shapes of the objects. Needs a rebase though |
|
Rebased and tested again, it works as expected. The "vignette" effect is also gone (it was already fixed in |
63a59c9 to
2823936
Compare
BlueCube3310
left a comment
There was a problem hiding this comment.
Looks good to me, I tested it on several scenes with many meshes and it works correctly. Additionally it makes it easier to notice how the occluders interact with the scene
There was a problem hiding this comment.
This should just be a flag otherwise we are increasing load times for no reason
There was a problem hiding this comment.
I've pushed a second commit to attempt this, but it doesn't seem to work on my end (it just renders as it did before).
ff35f6e to
34f10ed
Compare
There was a problem hiding this comment.
This should probably be
| copy.push_constant.flags |= COPY_TO_FB_FLAG_OCCLUSION_CULLING_BUFFER; | |
| copy_to_fb.push_constant.flags |= COPY_TO_FB_FLAG_OCCLUSION_CULLING_BUFFER; |
There was a problem hiding this comment.
Thanks 🙂 I've tried this but now I just see a fully opaque red viewport when the debug draw mode is enabled. So there's still an issue somewhere else.
There was a problem hiding this comment.
The correct pipeline is never applied since it relies on the "COPY_TO_FB_OCCLUSION_CULLING_BUFFER" mode that doesn't get used now
34f10ed to
06efb5b
Compare
This allows for easy, depth-aware navigation in the 3D editor while being able to view which meshes are occluders and which meshes aren't. Co-authored-by: myaaaaaaaaa <103326468+myaaaaaaaaa@users.noreply.github.com>
06efb5b to
dce8f16
Compare
This allows for easy, depth-aware navigation in the 3D editor while being able to view which meshes are occluders and which meshes aren't.
I've tested this change with both Forward+ and Mobile rendering methods. No Vulkan validation errors are reported when running with
--gpu-validationon either rendering method. (The Compatibility rendering method currently doesn't support most debug draw modes, including the occlusion culling buffer. Occlusion culling itself does work though.)Thanks @myaaaaaaaaa for the help 🙂
Testing project: test_occlusion_culling_buffer.zip
Preview
The two cubes in the front have occluders, while the cube in the back doesn't.