public sealed class LodExtractionSystemRegisters each authored LOD group with the feature that chooses between its levels.
As a system
- Phase
- PreRender
Remarks
The producer LodRenderFeature was written for and never had. That feature decides which level of a group a view sees and hides the rest, and it does nothing at all until somebody calls Add and Assign — which, until this system, only a test did. A scene therefore had no discrete LOD at any distance, on every mesh that is not virtualized, silently and with every counter healthy.
A group is a parent and its levels are its children. LodGroupComponent carries the thresholds and LodLevel says which level a child is; the group's identity is the parent entity, because LodRenderFeature chooses one level per group and two objects sharing a threshold list must not share a choice.
In PreRender, after MeshExtractionSystem, which is MorphWeightSystem's reason exactly: a child that appeared this frame has no RenderHandle until that system ran, and a membership written for an object that does not exist names whatever takes the slot. The declared access is what orders them — this reads RenderHandle, which that one writes.
⚠ Restated every frame rather than stamped once. A render object does not survive MeshExtractionSystem.Resettle — a document reload in the editor is exactly that — so a membership written once would be pointing at a dead index by the second load. The walk is over the entities carrying LodLevel and no others, so a scene with no LOD in it pays a walk over no chunks.
Fields and properties (6)
public LodRenderFeature? FeatureThe feature that chooses a level. Null is a harmless no-op.
public RenderSystem? RendererThe render system the memberships live in.
public int GroupCountHow many groups are registered right now.
public int AssignedHow many levels were given a membership by the last run.
public int MalformedHow many groups the last run refused because their thresholds do not descend.
public SystemAccess AccessWhat this system reads and writes.
Methods (2)
public override JobHandle Update(in SystemContext context, JobHandle dependency)public void Run(World world, float deltaSeconds = 0)Registers every authored group and gives every extracted level its membership.
Used by (3)
- LodExtractionTestsVixen.Engine.Renderer.Tests
- WorldRendererVixen.Engine.Renderer
- EditorWorldRendererVixen.Editor.App