Coldwave Read the docs

GPU skinning#

Coming next. This feature is not in frost yet. The page is written ahead so you can plan for it; until it ships, nothing here works in the frost you have.

Crowds of animated characters get cheaper to draw, with nothing for you to change. Today a posed model (a Pose, a clip playing on a rigged glTF) is bent on the CPU. With GPU skinning the CPU works out the model's joints once a pose, and the graphics device bends the model's own meshes by them, four joints a corner, in the picture and in every shadow map: natively, in WebGL2 and in WebGPU.

What changes for a game#

Nothing to write: a game with a rigged model gets it as it loads.

  • Cheaper crowds. Every thing on one model is one instanced draw a part, so many figures of one model cost about what one does on the CPU side.
  • Shared poses. A thing held at a joint (Parent.joint) shares its pose with every thing at the same moment of the same clip; a thing with a Bone of its own keeps its own.
  • The same game. Checksums are unchanged: skinning is drawing, never simulation. An unposed mesh is the same picture to the byte. A posed one is within one level of the CPU's picture, but for a rare pixel on an edge.
  • No hitch. The pipelines for posed meshes are made as a game with a rigged model loads, never while it plays.

Checks#

frost test holds a game's checksum as before, and its shots compare as before; a shot of a posed figure may need to be taken again once (one edge pixel differs). frost bench --draw shows the drawing's spans and draw calls, which fall for a crowd of one model.

When it ships, animation gets a section on it.