VK perf: shadow passes redraw every rigged avatar per cascade / projector tile (heavy venues) #564

Closed
opened 2026-10-08 19:18:40 +00:00 by sky_line · 1 comment
Owner

Measured (PEAK Lounge, ~70 heavy human mesh avatars, RTX 5090, vulkan-port-tb incl. #559/#561): 9 FPS, GPU ~110 ms.

  • c_projshadow 46.5 ms (16 projector lights, shadow-MAP path: the VRAM ladder dropped RT to rt-level 6; the same scene with projshadow=rt ran ~30 FPS)
  • c_shadows 24.3 ms (sun cascades)
  • g_p2_post_rig 13.2 ms, c_preskin 6.4 ms; post_rig 59M tris/frame; static scene 3.8M tris

Root cause (code read): every rendered sun cascade and every projector tile that holds an avatar draws the main cull's WHOLE rigged caster prefix (mCmd[3/4/5/8/9] at shadowCounterSlot) plus the pass's off-screen region. There is no per-view culling of rigged casters: a projector cone with one avatar in it redraws all ~70 avatars, and each cascade draws every avatar whether or not its shadow can land in that slice (casterOk is static-only). Shadow views also draw the full-detail rigged LOD the main view picked.

Plan:

  1. Per-shadow-view rigged caster cull (GPU compute, sibling of clean_probe_rigcull.comp): per cascade / projector tile, keep only draws whose wearer box touches the view's frustum (+ cascade caster planes / min-texel size); stable compaction into per-view indirect lists.
  2. Shadow caster LOD: when the drawn slot has #561 decimated steps, draw the coarsest step whose error stays under the view's texel footprint, via step index ranges renumbered onto the drawn slot's (shared) skinned vertices.
  3. Projector dynamic-tile budget per frame (round-robin by staleness x influence).
  4. Sun cascades: static cache + dynamic rigged overlay in cached modes (fixes the stale avatar shadow in cached cascades).
**Measured** (PEAK Lounge, ~70 heavy human mesh avatars, RTX 5090, vulkan-port-tb incl. #559/#561): 9 FPS, GPU ~110 ms. - c_projshadow 46.5 ms (16 projector lights, shadow-MAP path: the VRAM ladder dropped RT to rt-level 6; the same scene with projshadow=rt ran ~30 FPS) - c_shadows 24.3 ms (sun cascades) - g_p2_post_rig 13.2 ms, c_preskin 6.4 ms; post_rig 59M tris/frame; static scene 3.8M tris **Root cause (code read):** every rendered sun cascade and every projector tile that holds an avatar draws the main cull's WHOLE rigged caster prefix (mCmd[3/4/5/8/9] at shadowCounterSlot) plus the pass's off-screen region. There is no per-view culling of rigged casters: a projector cone with one avatar in it redraws all ~70 avatars, and each cascade draws every avatar whether or not its shadow can land in that slice (casterOk is static-only). Shadow views also draw the full-detail rigged LOD the main view picked. **Plan:** 1. Per-shadow-view rigged caster cull (GPU compute, sibling of clean_probe_rigcull.comp): per cascade / projector tile, keep only draws whose wearer box touches the view's frustum (+ cascade caster planes / min-texel size); stable compaction into per-view indirect lists. 2. Shadow caster LOD: when the drawn slot has #561 decimated steps, draw the coarsest step whose error stays under the view's texel footprint, via step index ranges renumbered onto the drawn slot's (shared) skinned vertices. 3. Projector dynamic-tile budget per frame (round-robin by staleness x influence). 4. Sun cascades: static cache + dynamic rigged overlay in cached modes (fixes the stale avatar shadow in cached cascades).
sky_line added this to the Slipstream project 2026-10-08 19:18:40 +00:00
Author
Owner

Shipped in a published release and tested; closing (testing-lane sweep 2026-10-11).

Shipped in a published release and tested; closing (testing-lane sweep 2026-10-11).
sky_line 2026-10-11 13:25:11 +00:00
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#564
No description provided.