Skip to content

perf: skinned mesh LOD + per-object motion vectors #142

Description

@shadow-kernel

Context

Two verified skeletal-animation gaps from the gap analysis: (1) the vertex-clustering decimator (Engine/Graphics/Geometry/MeshDecimator.h, ResourceRegistry_Lod.cpp) drops bone weights, so skinned meshes skip the LOD chain entirely — every character renders full-detail at any distance; (2) motion vectors are camera-only depth reprojection (DX12MotionVectorPipeline), so fast skeletal motion ghosts under DLSS Frame Generation (and will ghost under the new TAA). A horror game is characters: a monster crowd stress test hits both problems at once.

Goal

Make the decimator weight-preserving so skinned meshes get real LOD chains, and add a per-object motion-vector path for skinned/dynamic geometry that renders true previous-position velocity using last frame's bone palette and world matrix.

Acceptance Criteria

  • Decimation carries bone indices/weights through vertex clustering (re-normalized, top-4 influences) matching the 52-byte skinned vertex layout
  • Skinned meshes populate lodMesh[] chains and participate in distance-based LOD selection like rigid meshes
  • Previous-frame bone palettes retained (second palette ring) and previous world matrices tracked per skinned item
  • Skinned motion-vector pass writes object velocity into the RG16F mvec RT consumed by DLSS-FG and TAA
  • DLSS-FG ghosting on fast skeletal motion visibly reduced (A/B F12 captures on the skinned crowd benchmark)
  • Skinned crowd benchmark frame time improves at distance with LOD active; no popping regressions (deterministic selection)

Technical Notes

Motion-vector VS reuses skinned.hlsl skinning with prev palette + prev VP; output to the mvec pass as geometry rather than fullscreen reprojection. Bone palette memory doubles — coordinate with the upload-ring arena work.

Dependencies

  • rendering: TAA + temporal history buffer
  • perf: frame allocators & memory arenas

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-mediumMittlere Prioritätarea:animationSkelett-Animation, Keyframes, State Machinesarea:renderingRenderer, Lichter, Schatten, Post-FX, Shadersize:L~1 Wochetype:perfPerformance-Arbeit (FPS, Speicher, Ladezeiten)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions