Skip to content

Avoid rebuilding aggregate raytrace scene buffers every frame - #153

Merged
anirul merged 2 commits into
masterfrom
codex/fix-raytrace-scene-rebuilds
Apr 8, 2026
Merged

Avoid rebuilding aggregate raytrace scene buffers every frame#153
anirul merged 2 commits into
masterfrom
codex/fix-raytrace-scene-rebuilds

Conversation

@anirul

@anirul anirul commented Apr 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • stop invalidating aggregate OpenGL raytrace scene buffers by frame time
  • stop invalidating aggregate Vulkan raytrace scene buffers by elapsed time
  • add buffer generations and no-op unchanged buffer copies so aggregate scene refresh only runs when raytrace source state actually changes

Root cause

Both backends were rebuilding aggregate raytrace scene triangles/BVH every frame even when the scene was static. The client-level regression showed up as a large FPS drop because acceleration structure work was happening continuously instead of only when source geometry or transforms changed.

Verification

  • cmake --build --preset windows-client-debug in grpcMMO
  • cmake --build C:\Users\frede\github\Frame\build\windows --config Debug --target FrameOpenGL FrameVulkan

Notes

Dynamic raytrace sources still rebuild the aggregate scene when their actual state changes. This PR only removes the unconditional per-frame rebuild behavior for unchanged scenes.

@anirul
anirul merged commit 0150d8b into master Apr 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant