public interface IVisibilityGroupWhich objects each view can see, however that answer was arrived at.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Two implementations, one question. VisibilityGroup tests every object on the job system; GpuVisibilityGroup uploads the same records and dispatches a compute shader. [docs/plan/06 § Frame structure] calls for both — GPU culling "where capabilities allow", with "the CPU path remain[ing] for GL/WebGL" — and an interface is what lets a compositor choose without anything downstream knowing which it got.
The result is a bitset either way, and that is the load-bearing part of the contract. Sorting walks Words a word at a time; a feature narrows the set through Hide. Neither would work against an implementation that answered with a list, so the shape of the answer belongs here rather than to whichever thing computed it.
After Cull returns, the bits are this frame's. That is the whole obligation an implementation takes on, and it is what makes the two interchangeable — a group whose answer was a frame old would produce geometry that pops at the edges of the screen with nothing anywhere to say why.
Fields and properties (1)
int ViewCountHow many views have results.
Methods (5)
bool IsVisible(int viewIndex, RenderObjectId id)Whether an object is visible in a view.
ReadOnlySpan<ulong> Words(int viewIndex)The raw visibility words for a view, for a consumer that walks them itself.
void Hide(int viewIndex, RenderObjectId id)Removes an object from a view after culling has run.
int VisibleCount(int viewIndex)How many objects are visible in a view.
void Cull(RenderObjectStore store, IReadOnlyList<RenderView> views, JobScheduler? scheduler = null)Tests every object against every view, replacing the previous frame's answer.
Used by (10)
- ForwardLightingRenderFeatureVixen.Rendering
- FrameBudgetTestsVixen.Rendering.Tests
- GpuVisibilityGroupVixen.Rendering
- GraphicsCompositorTestsVixen.Rendering.Tests
- LodRenderFeatureVixen.Rendering
- LodTestsVixen.Rendering.Tests
- MaterialRenderFeatureVixen.Rendering
- RenderSystemVixen.Rendering
- ShadowMapRendererTestsVixen.Rendering.Tests
- VisibilityGroupVixen.Rendering