GPU skinning
· One min read
A rig deforms its mesh on the GPU, from a palette of joint matrices, and the mesh's buffers are never touched.
What landed
- 3D rigs. An imported glTF rig — joints, weights and clips — is skinned in the vertex shader from a joint palette the animation writes each frame. Thousands of vertices cost the palette upload, not a rebuild.
- 2D polygons. A
polygonwith bone weights is skinned the same way, at itspixels_per_unit, so a skinned character in 2D is one draw. - The CPU path stays. A node with its own
materialskins on the CPU, and headless tests measure that path: the reference the GPU result is checked against, with no GPU in CI.
[nodes.mesh]
source = "models/column.glb"
[nodes.animation]
clip = "animations/sway.toml"
balaur import model.glb writes the joints, the mesh and the clips as
TOML the editor edits. Animation has
the rig tools.
