Vixen
02b45cc4
csharp
public static class MeshletValidator

Checks that a finished DAG cannot crack, and says exactly where if it can.

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

Remarks

Improvement 5 of docs/plan/22-virtualized-geometry.md: DAG validity as a build error. Nanite's crack-freedom is a property its builder is careful to maintain; making it a checked invariant costs one pass over a structure that is already in memory, and converts the engine's most notorious artefact class into a build that fails with a group index in the message.

Two invariants matter and the rest is book-keeping. Errors must increase strictly along every DAG edge, or a threshold exists at which a cut draws neither a cluster nor its parent. And a group's outer boundary must be bit-identical between its children and the clusters that replaced them, or a cut that takes one on each side of it meets two surfaces that do not join. Everything else here — ranges, levels, membership — exists so that a failure of those two is reported as itself rather than as an exception somewhere downstream.

The checks recompute rather than re-read: the boundary comparison walks the clusters' triangles out of the packed arrays and rebuilds the edge sets from the positions. A check that asked the builder what it had done would pass whenever the builder was self-consistently wrong, which is the only interesting case.

Methods (1)

Used by (3)

  • MeshletBuilderTestsVixen.Rendering.VirtualGeometry.Tests
  • MeshletValidatorTestsVixen.Rendering.VirtualGeometry.Tests
  • ModelCompilerVixen.Editor.Assets