Module gpu_skin
Expand description
Hardware GPU PGA Motor Dual-Quaternion Skinning Palette & Vertex Shader Bridge.
Converts CPU-evaluated skeletal joint hierarchies (Motor in f64) into compact
64-byte GpuJointMotorPair ([f32; 4] real + dual parts for current and previous frames)
suitable for single-pass GPU vertex dual-quaternion skinning and exact per-vertex
Temporal Anti-Aliasing (TAA) motion vectors.
Honors AGENTS.md §0 & §0-A: evaluate_skinning_motor_palette_zero_heap and
gpu_shader_skin_vertex_reference perform zero heap allocations (HotZeroHeap).
Structs§
- GpuJoint
Motor Pair - 64-byte GPU storage record per joint storing both current-frame and previous-frame
skinning PGA
Motors ($M_{\text{skin}, j} = M_{\text{world}, j} \circ M_{\text{inv_bind}, j}$). - GpuSkinned
Vertex - 24-byte static vertex skinning attribute (
JOINTS_0+WEIGHTS_0) uploaded once per mesh.
Constants§
- MAX_
GPU_ RIG_ JOINTS - Maximum joints supported per GPU skeletal rig palette (
128joints =8 KiBper instance). - MAX_
GPU_ SKELETON_ INSTANCES - Maximum concurrent skeletal instances resident in a single GPU storage buffer.
Functions§
- evaluate_
skinning_ motor_ palette_ zero_ heap - Evaluates the GPU skinning
Motorpalette in a single zero-heap pass (HotZeroHeap). - gpu_
shader_ skin_ vertex_ reference - Deterministic software reference implementation of the WGSL vertex shader PGA
Motordual-quaternion skinning kernel (HotZeroHeap). - hemisphere_
align_ motor - Aligns
candidateto the same $S^3$ double-cover hemisphere asreference. - skin_
vertices_ gpu_ reference_ into - Batch helper that skins a slice of vertices via
gpu_shader_skin_vertex_referenceinto caller-supplied output slices (HotZeroHeap).