pub struct SkinnedInstanceDesc<'a> {
pub mesh: &'a SkinnedMesh,
pub material: usize,
pub transform: Mat4,
}Expand description
Where a skinned object is, and what it draws: InstanceDesc with a
SkinnedMesh where the description’s mesh index would be.
The mesh is a reservation rather than an index because a skinned draw is not
only a mesh — it also names a run of the vertex pool the skinning dispatch
fills, and which of the reservation’s two runs that is changes every frame.
ForwardRenderer::begin_skinned_frame is what keeps it current, so nothing
here carries a parity.
Fields§
§mesh: &'a SkinnedMeshThe region this object is drawn out of, from
ForwardRenderer::reserve_skinned.
material: usizeWhich SceneDesc::materials row it shades through, exactly as
InstanceDesc::material.
transform: Mat4Where it is: a model matrix, on InstanceDesc::transform’s terms.
The joints are not in it — a palette carries each joint’s global
transform times its inverse bind matrix, and this is what puts the
deformed mesh in the world. See
SkinRange::palette.