Skip to content

fix(scene): fire EVENT_PRECULL after frustum update#8793

Merged
mvaligursky merged 1 commit into
mainfrom
mv-precull-frustum-order
May 27, 2026
Merged

fix(scene): fire EVENT_PRECULL after frustum update#8793
mvaligursky merged 1 commit into
mainfrom
mv-precull-frustum-order

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

Reorder cullComposition so EVENT_PRECULL is dispatched after camera.frameUpdate and updateCameraFrustum have run. Listeners now receive a camera whose frustum reflects the current frame's state, which makes the event usable for custom culling, LOD selection, and other logic that depends on up-to-date frustum planes.

This also aligns behavior with the shadow renderer's EVENT_PRECULL site, which already fires after its frustum is updated.

Fixes #8789.

Changes:

  • EVENT_PRECULL now fires after the camera frustum has been recomputed for the frame.

Behavior change:

  • Listeners that previously relied on EVENT_PRECULL firing before the frustum update (e.g., to mutate the camera transform and have that change picked up by this frame's frustum) must now call Renderer#updateCameraFrustum themselves, or move that logic earlier.

@mvaligursky mvaligursky self-assigned this May 27, 2026
@mvaligursky mvaligursky added the area: graphics Graphics related issue label May 27, 2026
@mvaligursky mvaligursky merged commit df7341a into main May 27, 2026
13 of 14 checks passed
@mvaligursky mvaligursky deleted the mv-precull-frustum-order branch May 27, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update EVENT_PRECULL logic

1 participant