Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depth pre-pass is broken #70881

Closed
TokisanGames opened this issue Jan 3, 2023 · 2 comments · Fixed by #70884
Closed

Depth pre-pass is broken #70881

TokisanGames opened this issue Jan 3, 2023 · 2 comments · Fixed by #70884

Comments

@TokisanGames
Copy link
Contributor

TokisanGames commented Jan 3, 2023

Godot version

v4.0.beta.custom_build [96f1204]

System information

Windows 11/64, RTX 3070, Vulkan

Issue description

From beta10 to the current master, depth prepass is broken.

Alpha
image

Depth Prepass
image

Alpha
image

Depth Prepass depth_prepass_alpha
image

Depth Prepass Beta 10
image

Note that the shadows render fine, as does vertex animation.

I also get a lot of vulkan errors that I don't get in b10. Many repeats of these on load, but not continuous:

ERROR: Condition "!named_textures.has(key)" is true. Returning: RID()
   at: get_texture_slice (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:357)
ERROR: Texture (binding: 0, index 0) is not a valid texture.
   at: (drivers/vulkan/rendering_device_vulkan.cpp:5465)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129)
ERROR: Condition "!uniform_set" is true.
   at: compute_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7807)
ERROR: Uniforms were never supplied for set (0) at the time of drawing, which are required by the pipeline
   at: (drivers/vulkan/rendering_device_vulkan.cpp:8006)
ERROR: Condition "!rt" is true. Returning: RID()
   at: render_target_get_override_depth_slice (servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:2688)

I'm bisecting now....

Steps to reproduce

See MRP. Change alpha on the tree.

Minimal reproduction project

You can use my demo from #63675
https://github.com/godotengine/godot/files/10256553/test_zorder.zip

@TokisanGames
Copy link
Contributor Author

Bisecting reveals the winner is....
[d44a91c] use depth prepass to increase performance
#70214
@Ansraer

@clayjohn
Copy link
Member

clayjohn commented Jan 3, 2023

Looks like we should disable that option when depth prepass is used as the user doesn't have control over the depth threshold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants