Module gpu_morph
Expand description
GPU Morph Target (Blend Shape) & Ontogenetic Deformation Bridge (gpu_morph.rs).
Packs morph target position and normal deltas into 32-byte GpuMorphDelta records
and combines explicit facial/pose blend-shape weights with OntogeneticStateHeader
(EntityOntologyMiniHeader) metabolic state (damage_permill, hydration_permill, stage)
inside a 48-byte GpuInstanceMorphWeights uniform/storage record.
Honors AGENTS.md §0 & §0-A: all evaluation functions are HotZeroHeap.
Structs§
- GpuInstance
Morph Weights - 48-byte per-instance morph weight uniform/storage record uploaded to the GPU.
- GpuMorph
Delta - 32-byte GPU storage record holding a single morph target’s per-vertex position and normal delta.
- Ontogenetic
State Header - Domain-neutral 40-byte ontogenetic and metabolic state header (
EONT1layout).
Constants§
- MAX_
GPU_ MORPH_ TARGETS - Maximum morph targets evaluated simultaneously per instance on the GPU.
Functions§
- compute_
ontogenetic_ morph_ weights_ from_ header_ zero_ heap - Convenience wrapper extracting
stage,damage_permill, andhydration_permilldirectly from anOntogeneticStateHeader(EntityOntologyMiniHeader). - compute_
ontogenetic_ morph_ weights_ zero_ heap - Computes
GpuInstanceMorphWeightswith zero heap allocations (HotZeroHeap), combining explicit pose/facial blend-shape weights with ontogenetic/metabolic state (damage_permill,hydration_permill, andstageontogenetic factor). - evaluate_
morph_ deltas_ zero_ heap - Evaluates linear blend-shape morph deltas into caller-supplied vertex position and normal
buffers with zero heap allocations (
HotZeroHeap). - ontogenetic_
stage_ growth_ factor - Maps a
DevelopmentalStagediscriminant (0..=4) to a normalized ontogenetic growth factor in[0.0, 1.0].
Type Aliases§
- Entity
Ontology Mini Header - Backwards-compatible alias for
OntogeneticStateHeader.