Skip to content

Added has_no_cpu_culling check#23508

Closed
MarelGuy wants to merge 1 commit intobevyengine:mainfrom
MarelGuy:fix-nocpuculling-visibility
Closed

Added has_no_cpu_culling check#23508
MarelGuy wants to merge 1 commit intobevyengine:mainfrom
MarelGuy:fix-nocpuculling-visibility

Conversation

@MarelGuy
Copy link
Copy Markdown
Contributor

@MarelGuy MarelGuy commented Mar 25, 2026

Objective

Fixes #23473

Solution

Modified check_visibility_cpu_culling to query for Has<NoCpuCulling>.

Testing

  • Did you test these changes? If so, how?
    I tested with these examples, with and without NoCpuCulling (where aplicable):

    • debug_frustum_culling
    • visibility_range
    • display_and_visibility
    • shadow_caster_receiver
    • many_foxes
    • many_sprites

    I also tested with the code provided in Adding NoCpuCulling to a mesh at runtime hides the mesh #23473

  • Are there any parts that need more testing?
    Not that I reckon

  • How can other people (reviewers) test your changes? Is there anything specific they need to know?
    Run the tests above

  • If relevant, what platforms did you test these changes on, and are there any important ones you can't test?
    I tested on a Macbook M3 pro with Tahoe 26.4 beta.

@MarelGuy MarelGuy closed this Mar 25, 2026
@MarelGuy MarelGuy reopened this Mar 25, 2026
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Mar 25, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Rendering Mar 25, 2026
@alice-i-cecile alice-i-cecile added the S-Needs-Benchmarking This set of changes needs performance benchmarking to double-check that they help label Mar 25, 2026
&GlobalTransform,
Has<NoFrustumCulling>,
Has<VisibilityRange>,
Has<NoCpuCulling>,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is likely to regress performance badly in large scenes, since we're now doing an O(n) scan over all renderable entities, even if they have NoCpuCulling.

@alice-i-cecile alice-i-cecile added the X-Contentious There are nontrivial implications that should be thought through label Mar 25, 2026
@alice-i-cecile alice-i-cecile requested a review from pcwalton March 25, 2026 17:07
@pcwalton
Copy link
Copy Markdown
Contributor

I think #23534 is the correct fix for this

@github-project-automation github-project-automation bot moved this from Needs SME Triage to Done in Rendering Mar 27, 2026
@MarelGuy MarelGuy deleted the fix-nocpuculling-visibility branch March 28, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Needs-Benchmarking This set of changes needs performance benchmarking to double-check that they help X-Contentious There are nontrivial implications that should be thought through

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Adding NoCpuCulling to a mesh at runtime hides the mesh

3 participants