-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Vulkan: SSR breaks with transparent materials #59512
Comments
You are opening the project with Alpha 1 and some things have changed since then. Try again with the latest Alpha 5. If that doesn't work either try deleting the .godot folder. |
Possibly related: #59015 I included some videos there of a few different StandardMaterial3D settings that didn't really work with SSR/SDFGI, and one that does with a shader that manually discards alpha (but never sets the |
@ComputehGuy I'm not getting this invalid/corrupt warning, that's weird. Also for some reason in your image I can see the material doesn't have transparencies enabled, try setting transparency in the "Succulent" material to Depth-Pre Pass. |
I have updated the minimal reproduction project link to Alpha 8 and I can confirm it's still happening. Looking at the code changes of the "Initial TAA implementation" (#61319), it seems like JFonS is changing the FINAL_ACTION_DISCARD to a FINAL_ACTION_READ here as I described in the issue, so problably it will be fixed after merging. |
I can confirm it is fixed with #61319. |
Closed by: #61319 |
Godot version
v4.0.alpha.custom_build [3990152]
System information
Windows 10, Nvidia GTX 970 (471.11), Vulkan
Issue description
When enabling SSR in a scene with transparent materials the render is completely broken:
Taking a closer look, seems that it is related to how depth is managed when SSR is enabled in the merge_specular function here:
godot/servers/rendering/renderer_rd/effects_rd.cpp
Line 766 in 3990152
The final depth action is set to FINAL_ACTION_DISCARD, which at the end sets the flag VK_ATTACHMENT_STORE_OP_DONT_CARE in the attachment description. From the vulkan docs:
Looking in renderdoc, the transparencies get rendered just after the effects, and the depth buffer seems to be reaching the "Render 3D Transparent Pass" in an undefined state.
Changing the final depth action to FINAL_ACTION_READ seems to fix the issue, but I'm not completely sure this is the proper solution and intended behavior.
Steps to reproduce
1 - Add a mesh and apply a material that has transparencies.
2 - Enable SSR in environment node.
Minimal reproduction project
Test SSR.zip
The text was updated successfully, but these errors were encountered: