[rendering] Cluster LOD: incremental cut selection (stop re-walking every instance every frame) + skin once for raster and RT #1011

Open
opened 2026-10-24 02:35:24 +00:00 by sky_line · 1 comment
Owner

Cut selection is cluster LOD's biggest fixed maintenance cost, and the main reason CLOD isn't faster than legacy. Party, RTX 5090, CLOD on at startup (mesh shaders + DGC):

  • c_cl_rt_select 2.4-3.2 ms/frame
  • c_cl_rig_clas 2.1-2.6
  • c_cl_sk_skin 1.2-2.0 + weld 0.5-1.0
  • q_rt_build ~5.6 ms (legacy 3.6); graphics waits ~3.2 ms on it (g_join_rt_build)
  • plus the raster cut selection, and +1 ms of CPU front end against legacy

Cuts: raster ~99k clusters, RT ~85k; ~44k CLAS rebuilt per frame.

1. Incremental selection

  • Keep last frame's cut per instance. Re-walk only what changed:
    • an instance whose screen-space error bound crossed a hysteresis threshold (camera / avatar distance change, FOV, tolerance change);
    • visibility changes;
    • new or removed instances;
    • streaming completing pages it was waiting on;
    • the LOD controller changing the tolerance (rate-limited / staged across frames).
  • Everything else copies its cut forward.
  • Amortise: a per-frame budget of re-walked instances, most-error first, with a full re-walk on teleport / big changes.
  • The same for the raster cut and the RT cut (the RT cut can reuse the raster decision where they coincide).
  • Profile the selection modes first (sub-timers per mode) to see what dominates.

2. Skin once
Where the RT cut and the raster cut coincide (near avatars, and all avatars while #1008 cadence is off), RT should consume the raster's skinned output instead of skinning again in RT mode 9. Keep the welded / unwelded distinction correct.

3. CLAS rebuild volume
Only rebuild CLAS for clusters entering the cut or whose skinned vertices moved more than a fraction of the cut's error. Respect the self-hit identity window for self-shadowing avatars (#1008's flicker lesson: never alternate exact/stale for a self-shadowing receiver).

Goal: CLOD measurably faster than legacy in crowds (c_cl_rt_select well under 1 ms, g_join_rt_build near 0), with no correctness regressions (no popping, no missing parts, no self-shadow flicker). A/B settings for each part; stats for re-walked vs copied instances. Refs #1008, #1010, #928.

Cut selection is cluster LOD's biggest fixed maintenance cost, and the main reason CLOD isn't faster than legacy. Party, RTX 5090, CLOD on at startup (mesh shaders + DGC): - `c_cl_rt_select` **2.4-3.2 ms/frame** - `c_cl_rig_clas` 2.1-2.6 - `c_cl_sk_skin` 1.2-2.0 + weld 0.5-1.0 - `q_rt_build` ~5.6 ms (legacy 3.6); graphics waits ~3.2 ms on it (`g_join_rt_build`) - plus the raster cut selection, and +1 ms of CPU front end against legacy Cuts: raster ~99k clusters, RT ~85k; ~44k CLAS rebuilt per frame. **1. Incremental selection** - Keep last frame's cut per instance. Re-walk only what changed: - an instance whose screen-space error bound crossed a hysteresis threshold (camera / avatar distance change, FOV, tolerance change); - visibility changes; - new or removed instances; - streaming completing pages it was waiting on; - the LOD controller changing the tolerance (rate-limited / staged across frames). - Everything else copies its cut forward. - Amortise: a per-frame budget of re-walked instances, most-error first, with a full re-walk on teleport / big changes. - The same for the raster cut and the RT cut (the RT cut can reuse the raster decision where they coincide). - Profile the selection modes first (sub-timers per mode) to see what dominates. **2. Skin once** Where the RT cut and the raster cut coincide (near avatars, and all avatars while #1008 cadence is off), RT should consume the raster's skinned output instead of skinning again in RT mode 9. Keep the welded / unwelded distinction correct. **3. CLAS rebuild volume** Only rebuild CLAS for clusters entering the cut or whose skinned vertices moved more than a fraction of the cut's error. Respect the self-hit identity window for self-shadowing avatars (#1008's flicker lesson: never alternate exact/stale for a self-shadowing receiver). Goal: CLOD measurably faster than legacy in crowds (`c_cl_rt_select` well under 1 ms, `g_join_rt_build` near 0), with no correctness regressions (no popping, no missing parts, no self-shadow flicker). A/B settings for each part; stats for re-walked vs copied instances. Refs #1008, #1010, #928.
sky_line added this to the Slipstream project 2026-10-24 02:35:24 +00:00
Author
Owner

Parked 2026-10-24 (owner): CLOD RT perf is not profitable right now. Measured after #1008 fix / #1010 / #1011 at the party: RT build still ~5.6 ms; RT cut sub-timers: place 1.26, cut 0.55, admit 0.36, gather 0.23, reset 0.10, select 0.15; rig_skin (mode 9: copying the raster skinned vertices + the reuse compare) 2.67 ms, CLAS build alone 0.71, BLAS 0.66. CLAS reuse barely fires with dancing avatars (70.9k compared, 2.9k kept, 86.4k rebuilt). #1010 arena is fine (0 dropped / hidden / coarsened). Next step if revisited: remove the RT vertex copy (point CLAS build + hit shading at the raster skinned output for this frame; ~-2.5 ms), then mode 12 placement, then the CPU front end. Notes: research PLAN_60FPS_PARTY_2026-10-24.

Parked 2026-10-24 (owner): CLOD RT perf is not profitable right now. Measured after #1008 fix / #1010 / #1011 at the party: RT build still ~5.6 ms; RT cut sub-timers: place 1.26, cut 0.55, admit 0.36, gather 0.23, reset 0.10, select 0.15; **rig_skin (mode 9: copying the raster skinned vertices + the reuse compare) 2.67 ms**, CLAS build alone 0.71, BLAS 0.66. CLAS reuse barely fires with dancing avatars (70.9k compared, 2.9k kept, 86.4k rebuilt). #1010 arena is fine (0 dropped / hidden / coarsened). Next step if revisited: remove the RT vertex copy (point CLAS build + hit shading at the raster skinned output for this frame; ~-2.5 ms), then mode 12 placement, then the CPU front end. Notes: research PLAN_60FPS_PARTY_2026-10-24.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#1011
No description provided.