public sealed class VirtualGeometrySystemEvery device-side piece of virtualized geometry, joined up.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The assembly nobody had written. Six objects have to point at each other before a cluster reaches a pixel — the traversal, the page pool and its residency, the raster, the binning and the resolve — and every one of them was independently constructible and independently tested. What was missing is the only part with no natural owner: which of them holds which, and in what order they are told about a frame. A host doing it by hand gets it right the first time and wrong on the second project.
It owns the device objects and not the scene. What goes in is a device, an effect system and a budget; what comes out is a feature to register with a RenderSystem and six references a CompositorBuilder wants. It has no opinion about which objects draw, which is Draws' business, or where in the frame the passes go, which is a document's.
One page pool for the scene, and that is the whole of the streaming budget. Slots times page size is the resident geometry a project has decided to pay for, and every mesh registered through Content shares it — which is what makes a hundred virtualized meshes cost one budget rather than a hundred.
Fields and properties (16)
public StreamMeshletPageSource SourceWhere every mesh's page blob lives, and what the pool reads out of.
public MeshletPagePool PagesThe pool every resident page lives in.
public PageResidency ResidencyWhat decides which pages are in it.
public GpuClusterVisibility VisibilityThe cluster traversal.
public GpuClusterRaster RasterThe draw that fills the visibility buffer.
public GpuClusterSoftwareRaster SoftwareRasterThe compute raster phase 6 routes the sub-pixel clusters to.
public GpuVisibilityTiles TilesThe binning that sorts its tiles by material.
public GpuClusterResolve ResolveThe per-material shading that consumes those bins.
public VirtualGeometryRenderFeature FeatureThe feature a scene's objects draw through.
public IReadOnlyList<ResolveMaterial> MaterialsWhich material each bin holds, as the resolve dispatches them.
public int MeshCountHow many meshes have been loaded into it.
public EffectSystem? EffectsWhere every variant is compiled, which every one of the four passes needs.
public ComputePipelineCache? PipelinesWhere the compute pipelines come from, on the same terms.
public EffectPipelineDescriber? ModulesWhere the raster's shader modules come from.
public SceneConstants? SceneThe frame's per-frame constants, which the resolve's lighting reads.
public ViewConstants? ViewConstantsThe frame's per-view constants.
Methods (6)
public VirtualGeometrySystem(IGraphicsDevice device, int slots = 512, int pageSize = 131072)Builds the stack on a device.
public int Content(int id, ReadOnlySpan<byte> hierarchy, ReadOnlySpan<byte> pages, Stream data)Loads a mesh out of the artefacts a build wrote, and makes it drawable.
public int Content(int id, VirtualGeometryAsset asset, Stream data)Loads a mesh out of the one chunk a build writes the records as.
public void Register(RenderSystem system)Registers the feature with a render system.
public void Supply(CompositorBuilder builder)Hands a compositor builder everything its two nodes need.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (9)
- ArenaThirdPersonShooter
- VirtualGeometryGameVirtualGeometry
- AssetVirtualGeometrySourceVixen.Engine.Renderer
- SceneRenderHostTestsVixen.Engine.Renderer.Tests
- VirtualGeometryContentTestsVixen.Rendering.Tests
- VirtualGeometryDeviceTestsVixen.Graphics.Golden.Tests
- VirtualGeometryGoldenTestsVixen.Graphics.Golden.Tests
- WorldRendererVixen.Engine.Renderer
- ImportedGeometryLoadsTestsVixen.Editor.Assets.Tests