-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Incorrect depth sorting for materials using Depth Prepass and materials using blend modes like Add. (Still affects Godot 4) #49389
Comments
Can you test this in a more recent release? There were some fixes to the depth prepass and transparency sorting that came in 3.3. For reference, current stable is 3.3.2 https://godotengine.org/download Also, is this GLES2 or GLES3? |
@clayjohn Apologies, I typo'd when writing down the Godot version number, I meant to type 3.3.2 when I created this issue. |
Do you have the same issue when switching to GLES2? |
@clayjohn Yes, here's a video of the MRP in GLES2. video-2021-06-07_18.56.00.mp4 |
Fixed by #50721. |
I'm guessing developers are probably already aware of this, but just in case, this issue is still present in the latest Godot 4 beta. (Beta5 as of writing) |
Godot version:
3.3.2.stable
OS/device including version:
Both Rendering backends
OS: Linux Mint 20.1 x86_64
GPU: NVIDIA GeForce GTX 1060 6GB - Driver version: 460.80
Issue description:
https://user-images.githubusercontent.com/781121/121025186-33f29800-c7a5-11eb-9b49-4f4638db550a.mp4
https://user-images.githubusercontent.com/781121/121025398-69978100-c7a5-11eb-95bd-0119a6260588.mp4
I'm working on a scene with trees, for the trees I need to use a material that has "depth_draw_alpha_prepass" enabled, to have the transparent leaves texture cast shadows.
I also use materials for particle systems and effects with the "Add" blend mode enabled, as shown in the videos.
Godot for some reason does not sort these correctly when the tree leaves material has "depth_draw_alpha_prepass" enabled.
As soon as I turn that off, the sorting behaves like it should again, but then my leaves do not cast shadows anymore, and don't render correctly anymore either.
Is this working as intended? Am I expecting too much of the engine here?
(I ask this because I know depth sorting with transparent materials is hard to get right on most engines), or is there actually something going wrong here?
Thanks in advance.
Steps to reproduce:
Minimal reproduction project:
mrp.zip
The text was updated successfully, but these errors were encountered: