Vixen
dd8b0a81
csharp
public sealed class MorphWeightSystem

Carries each entity's blend-shape weights into the feature that dispatches for them.

Read the guide page for this →

As a system

Phase
PreRender

Remarks

The other end of the arrangement MorphRenderFeature describes, and the same shape as SkinningSystem next door in Vixen.Animation: the feature owns the buffer, the pipeline and the dispatch, and says explicitly that whoever fills the numbers is a system, because there is no callback of the renderer's between "the animation finished" and "the first weight is written".

In PreRender, after MeshExtractionSystem because the object has to exist before it can be given weights — an entity that appeared this frame has no RenderHandle until that system ran, and a weight written for an object that does not exist is silently dropped. The declared access is what orders them: this reads RenderHandle, which that one writes.

⚠ Weights are pushed every frame and the feature does the comparing. A system that only pushed on change would be a second place that decides what "changed" means, and the first place — SetWeights — is the one that also knows whether the vertices have ever been written at all.

Fields and properties (8)

  • public MorphRenderFeature? Feature

    The feature that holds the morphed vertices. Null is a harmless no-op.

  • public VirtualGeometryRenderFeature? Virtualized

    The feature that draws virtualized meshes. Null is a harmless no-op.

  • public RenderSystem? Renderer

    The render system the virtualized feature's records live in.

  • public int Weighted

    How many entities were given weights by the last run.

  • public SystemAccess Access

    What this system reads and writes.

  • public int Bound

    How many entities were told what their mesh calls its shapes by the last run.

  • public int VirtualizedCount

    How many of Weighted were virtualized rather than suballocated.

  • public int CastersWeighted

    How many shadow casters were given the same weights their object got.

Methods (2)

Used by (6)

  • BlendShapeAnimationSystemVixen.Animation
  • CompositorImageTestsVixen.Graphics.Golden.Tests
  • MorphRenderFeatureTestsVixen.Rendering.Tests
  • MorphedClusterTestsVixen.Rendering.Tests
  • WorldRendererVixen.Engine.Renderer
  • EditorWorldRendererVixen.Editor.App