Vertex skinning produces no visible effect even with posed joints
Repro
- Load a rigged model (
gltf/Fox.glb) with a stage created .with_vertex_skinning(false).
- Render the bind pose.
stage.set_has_vertex_skinning(true).
- Build an
Animator over the scene nodes + the first animation clip, and animator.progress(0.5) to pose the skeleton.
- Render again.
Result: the render is byte-identical to step 2 — 0 pixels differ.
What is NOT the problem (all verified by instrumentation)
- The animator works: after
progress(0.5), 22 of 26 Fox nodes' global translations changed
- The flag is set:
set_has_vertex_skinning(true) writes GeometryDescriptor::has_skinning
- The loader wires skins:
renderlet.set_skin(skin) (gltf.rs:1152), setting PrimitiveDescriptor::skin_id
- The loader reads per-vertex joints/weights: gltf.rs:419-450
- The shader gates on both conditions:
if config.has_skinning && self.skin_id.is_some() (primitive/shader.rs:93)
So every CPU-side piece is in place; the failure is in the GPU skinning path.
Note on the existing test
The rigged_fox crate test does not actually assert a visual difference between the skinned
and unskinned renders: assert_img_eq_cfg is called against the no-skinning baseline with a
different test_name, and no rigged_fox.png baseline exists in the repo. The test only
proves enabling skinning doesn't crash. (Skinning at bind pose is also a no-op by definition -
joint matrix x its inverse bind = identity - which is why posing the skeleton, as above, is
necessary to even attempt a visual check.)
Suspects
- the
SkinDescriptor / joints slab data read in the vertex shader
- joints/weights attribute wiring in the loaded vertices (e.g. always zero)
- the skin read path in
PrimitiveDescriptor::transform (primitive/shader.rs:93+)
Context
Found while writing the animation manual chapter (worktree
docs-missing-manual-buildout). The chapter documents set_has_vertex_skinning with a
caveat and links this issue; the example omits a skinning demo since the feature currently
has no visible effect.
Vertex skinning produces no visible effect even with posed joints
Repro
gltf/Fox.glb) with a stage created.with_vertex_skinning(false).stage.set_has_vertex_skinning(true).Animatorover the scene nodes + the first animation clip, andanimator.progress(0.5)to pose the skeleton.Result: the render is byte-identical to step 2 — 0 pixels differ.
What is NOT the problem (all verified by instrumentation)
progress(0.5), 22 of 26 Fox nodes' global translations changedset_has_vertex_skinning(true)writesGeometryDescriptor::has_skinningrenderlet.set_skin(skin)(gltf.rs:1152), settingPrimitiveDescriptor::skin_idif config.has_skinning && self.skin_id.is_some()(primitive/shader.rs:93)So every CPU-side piece is in place; the failure is in the GPU skinning path.
Note on the existing test
The
rigged_foxcrate test does not actually assert a visual difference between the skinnedand unskinned renders:
assert_img_eq_cfgis called against the no-skinning baseline with adifferent
test_name, and norigged_fox.pngbaseline exists in the repo. The test onlyproves enabling skinning doesn't crash. (Skinning at bind pose is also a no-op by definition -
joint matrix x its inverse bind = identity - which is why posing the skeleton, as above, is
necessary to even attempt a visual check.)
Suspects
SkinDescriptor/ joints slab data read in the vertex shaderPrimitiveDescriptor::transform(primitive/shader.rs:93+)Context
Found while writing the animation manual chapter (worktree
docs-missing-manual-buildout). The chapter documentsset_has_vertex_skinningwith acaveat and links this issue; the example omits a skinning demo since the feature currently
has no visible effect.