godot/servers/rendering/renderer_rd/forward_clustered
Robbie Cooper 79d3e090cd Vulkan Clustered: Fix culling of negatively-scaled objects
Negatively scaled objects should be mirrored. This is already implemented, but it breaks when mirrored and non-mirrored instances of the same object are visible together.

It turns out that the code that skips-over repeats in `RenderForwardClustered::_render_list_template` also skips the code that accounts for the culling mode of mirrored objects.

The solution here is to consider the `mirror` flag when determining repeats. This might result in more draw commands than necessary since a mirrored object can split a group of non-mirrored instances in two.

This problem doesn't appear in the mobile renderer because the repeat optimization isn't implemented there yet.

The problem still appears in MultiMeshInstance3D in *all* renderers.

Fixes #62879 and #58546.
2022-10-10 03:20:59 -04:00
..
render_forward_clustered.cpp Vulkan Clustered: Fix culling of negatively-scaled objects 2022-10-10 03:20:59 -04:00
render_forward_clustered.h Moving SSEffects settings into class 2022-10-04 11:03:36 +11:00
scene_shader_forward_clustered.cpp Default CanvasItem materials to not convert uniform colors to linear space. 2022-09-30 15:15:11 -07:00
scene_shader_forward_clustered.h Extract shared scene data into a separate class 2022-09-15 12:09:57 +10:00
SCsub