Vixen
02b45cc4
csharp
public sealed class SkinningSystem

Turns each animated entity's pose into the bone palette GPU skinning reads.

No guide page documents this yet — the page shows what the code says about itself.

As a system

Phase
PreRender

Remarks

The other end of the arrangement SkinningRenderFeature describes. That feature owns the buffer, the upload and the push constant, and says explicitly that whoever fills the palettes is the animation system, because there is no callback of the renderer's between "animation finished" and "the first palette is written". This is the system it means.

In PreRender, after AnimationSystem has run in Animation and after any IK a pose processor did. Palettes are a per-frame thing — the feature's Begin resets the upload buffer and every skinned object writes its own again — so a frame in which this does not run is a frame in which nothing is skinned, rather than one that draws stale bones.

Matrices are computed into a rented buffer, not a per-entity one. A skeleton's palette is written and immediately copied into the feature's upload buffer, so it lives for the length of one call; holding one per character would be a hundred matrices of permanently resident memory per instance to save an ArrayPool rent.

Fields and properties (3)

Methods (2)

  • public override JobHandle Update(in SystemContext context, JobHandle dependency)

    Runs the system.

  • public void Run(World world)

    Fills every skinned object's palette from its animator's pose.

Used by (2)

  • AnimationSystemsVixen.Animation
  • EcsIntegrationTestsVixen.Animation.Tests