Skip to main content

Module gpu_morph

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§

GpuInstanceMorphWeights
48-byte per-instance morph weight uniform/storage record uploaded to the GPU.
GpuMorphDelta
32-byte GPU storage record holding a single morph target’s per-vertex position and normal delta.
OntogeneticStateHeader
Domain-neutral 40-byte ontogenetic and metabolic state header (EONT1 layout).

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, and hydration_permill directly from an OntogeneticStateHeader (EntityOntologyMiniHeader).
compute_ontogenetic_morph_weights_zero_heap
Computes GpuInstanceMorphWeights with zero heap allocations (HotZeroHeap), combining explicit pose/facial blend-shape weights with ontogenetic/metabolic state (damage_permill, hydration_permill, and stage ontogenetic 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 DevelopmentalStage discriminant (0..=4) to a normalized ontogenetic growth factor in [0.0, 1.0].

Type Aliases§

EntityOntologyMiniHeader
Backwards-compatible alias for OntogeneticStateHeader.