Skip to content
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 Clustered: Fix culling of negatively-scaled objects #67176

Merged
merged 1 commit into from
Oct 11, 2022

Commits on Oct 10, 2022

  1. 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 godotengine#62879 and godotengine#58546.
    cooperra committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    79d3e09 View commit details
    Browse the repository at this point in the history