-
-
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
Added options for sorting transparent objects (port of PR #63040) #69998
Conversation
One thing that needs to be discussed (was already talking about this with @clayjohn) in chat, is whether we should make the sort on the two Vulkan renderers apply the same logic the GLES (and Godot 3) renderer does when we're dealing with a perspective camera. |
4676018
to
d73f5b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, As discussed on rocketchat, we should add this to decals and lights (which would supersede #60253). If you do so you will also need to update the GEOMETRY INSTANCE mask in instance_set_pivot_data()
d73f5b8
to
2751b32
Compare
I'm still not 100% sure about this so I'd like to move that into a separate PR if we wish to implement that. Lights and decals are applied to geometry in the shader as an additive process, I'm not sure if a sort is going to have any effect here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, lets go ahead and merge this and discuss sorting of other GeometryInstances after.
2751b32
to
6f4f38d
Compare
Thanks! |
This 'sorting_offset' is only for when the material goes through the transparent pipeline, right? I was trying to use this to avoid z-fighting I was having and it didn't seem to work so I thought it was bugged, but I guess it doesn't work for opaque mats. The docs/mouse_over don't mention it at all, if that's the case. |
This is a port of #63040 to Godot 4.
Bugsquad edit: This closes godotengine/godot-proposals#4099.