public sealed class VisibilityGroupWhich objects each view can see, as one bit per object per view, decided on the CPU.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Bits rather than a list of visible ids, and the reason is what happens next: every stage of every view walks this, and a bitset lets that walk be a word at a time while a list would be a pointer chase per object. It also makes the result a fixed size, so the culling job writes into memory it did not have to allocate.
Culling is per view, not per view per stage. An object either is or is not inside a frustum, and asking again for each stage would be the same arithmetic repeated — the stage mask filters afterwards, when the work list is built, where it is an and on a value already loaded.
The default implementation of IVisibilityGroup, and the one that runs everywhere: it needs no device, no compute support and no shader, which is why it is what a GL or WebGL target uses and what GpuVisibilityGroup falls back to.
Fields and properties (1)
public int ViewCountHow many views have results.
Methods (6)
public bool IsVisible(int viewIndex, RenderObjectId id)Whether an object is visible in a view.
public ReadOnlySpan<ulong> Words(int viewIndex)The raw visibility words for a view, for a consumer that walks them itself.
public void Hide(int viewIndex, RenderObjectId id)Removes an object from a view after culling has run.
public int VisibleCount(int viewIndex)How many objects are visible in a view.
public void Cull(RenderObjectStore store, IReadOnlyList<RenderView> views, JobScheduler? scheduler = null)public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (6)
- CompositorAssetTestsVixen.Rendering.Tests
- GpuVisibilityGroupVixen.Rendering
- GpuVisibilityGroupTestsVixen.Rendering.Tests
- RenderSystemVixen.Rendering
- ViewCullingDeviceTestsVixen.Graphics.Golden.Tests
- VisibilityGroupTestsVixen.Rendering.Tests