-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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: Decal sorting changes unexpectedly depending on camera rotation #49639
Comments
I've noticed this issue as well. It looks like we may need to add some additional sorting to decals, however, any additional sort operation is likely to be quite expensive when you have many decals in a scene. Does the issue remain if you move each decal slightly up or down on the global Y-axis? |
Changing each decal's height will eventually affect sorting at a given camera angle, but using a slightly different Y axis position for each decal doesn't fix the variable sorting issues depending on camera rotation: decal_sorting_height.mp4 |
If they were sorted based on the projector's center/origin/position in the projection direction, it would make it an intuitive adjustment for users (optionally with an additional exposed bias parameter). |
this still very much happen in 4.1.1 and 4.2 Videosimplescreenrecorder-2023-10-02_19.24.52.mp4 |
@mieldepoche Please open a new issue with a minimal reproduction project attached. |
Godot version
4.0.dev (6d98f84)
System information
Fedora 34, GeForce GTX 1080 (NVIDIA 465.31)
Issue description
The new Decal node exhibits sorting issues when the camera moves or rotates. This can be seen both in the editor and in running projects:
decal_sorting.mp4
I'm not sure how we should prevent this. We may not be able to rely on scene tree order because decals may be created with a lower-level API that does not use nodes. Maybe we could have a Render Priority property in the Decal node, so that users can force specific decals to render on top of others.
Steps to reproduce
Minimal reproduction project
test_decal_sorting.zip
The text was updated successfully, but these errors were encountered: