Cel P6: avatar mask — per-pixel avatar id from the GPU-driven pre-pass #549

Closed
opened 2026-10-08 06:28:04 +00:00 by sky_line · 1 comment
Owner

Part of epic #542 (from #186). Design + code citations are in the epic; read it first.

Size: M (3-4 d)

Per-pixel avatar identity for cel shading and FX scope. GPU-driven only: no per-face CPU work.

Scope

  • R16_UINT id attachment (avatar slot + 1, 0 = none), written by the depth pre-pass twins (static + rigged, opaque + mask) when a consumer wants it. The pre-pass is forced on while needed (RenderVKDepthPrepass, :25051).
    • Rigged = instance flag bit0, slot from SkinMeta.avatar_idx (llcleanskinstore.h:78-80).
    • Worn rigid attachments = bit9, skin_id = joint-table slot (llcleaninstancestore.h:61-67, clean_draw.vert:118).
    • Verify both share the avatar-slot index space (ensureAvatarSlot, llcleanskinstore.h:104-115).
    • System avatar body included.
  • Alpha-blended rigged (pass 2: hair, sheer clothing): a small extra pass re-issuing pass 2's rigged indirect lists into the id target (depth-test against scene depth, no depth write, alpha ≥ threshold).
  • Per-avatar selection SSBO (bitset by avatar slot): self / friends / all / chosen. Updated on change only.
  • Display-res, unjittered resolve (same mapping as clean_depth_up.comp) for post consumers.
  • Edge cases: own avatar in mouselook (hidden), impostors / jelly dolls (none = no mask), HUD space (excluded), mirrors / probes (not needed).
  • Debug view: RenderVKDebugView value showing ids as colours.

Done when

  • Debug view shows exact, stable coverage for several avatars with mesh bodies, rigged + rigid attachments and alpha hair, under TAA, render scale < 1 and camera motion.
  • Present in snapshots (forward / offscreen path).
  • Cost ≤ 0.1 ms at 1440p with 20 avatars; 0 when no consumer.
Part of epic #542 (from #186). Design + code citations are in the epic; read it first. **Size:** M (3-4 d) Per-pixel avatar identity for cel shading and FX scope. GPU-driven only: no per-face CPU work. **Scope** - **R16_UINT id attachment** (`avatar slot + 1`, 0 = none), written by the depth pre-pass twins (static + rigged, opaque + mask) when a consumer wants it. The pre-pass is forced on while needed (`RenderVKDepthPrepass`, :25051). - Rigged = instance flag bit0, slot from `SkinMeta.avatar_idx` (`llcleanskinstore.h:78-80`). - Worn rigid attachments = bit9, `skin_id` = joint-table slot (`llcleaninstancestore.h:61-67`, `clean_draw.vert:118`). - **Verify both share the avatar-slot index space** (`ensureAvatarSlot`, `llcleanskinstore.h:104-115`). - System avatar body included. - **Alpha-blended rigged** (pass 2: hair, sheer clothing): a small extra pass re-issuing pass 2's rigged indirect lists into the id target (depth-test against scene depth, no depth write, alpha ≥ threshold). - **Per-avatar selection SSBO** (bitset by avatar slot): self / friends / all / chosen. Updated on change only. - **Display-res, unjittered resolve** (same mapping as `clean_depth_up.comp`) for post consumers. - **Edge cases:** own avatar in mouselook (hidden), impostors / jelly dolls (none = no mask), HUD space (excluded), mirrors / probes (not needed). - **Debug view:** `RenderVKDebugView` value showing ids as colours. **Done when** - [ ] Debug view shows exact, stable coverage for several avatars with mesh bodies, rigged + rigid attachments and alpha hair, under TAA, render scale < 1 and camera motion. - [ ] Present in snapshots (forward / offscreen path). - [ ] Cost ≤ 0.1 ms at 1440p with 20 avatars; 0 when no consumer.
sky_line added this to the Slipstream project 2026-10-08 06:28:04 +00:00
Author
Owner

Done: Cel P6 (per-pixel avatar mask from the GPU-driven passes, 7e92b17b73). Shipped in 1.2.0 Beta 4/5 (ReShade effects + cel shading).

Done: Cel P6 (per-pixel avatar mask from the GPU-driven passes, 7e92b17b73). Shipped in 1.2.0 Beta 4/5 (ReShade effects + cel shading).
sky_line 2026-10-09 09:25:22 +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#549
No description provided.