Vixen
02b45cc4
csharp
public sealed class CompositorBuilder

Turns an authored GraphicsCompositorAsset into a running compositor.

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

Remarks

The asset names resources; the host binds the names. A texture handle belongs to a device that did not exist when the file was written, and a RenderView is built from a camera that moves — neither can be in a document. So the file says which target and which view, and this is where the two meet. One authored compositor then runs against a swapchain, an offscreen buffer or a test's scratch texture without changing a line of it.

Stages are the exception and are created here rather than bound, because a stage is its authored settings — a name, a sort mode and the blend and depth state its draws use. There is nothing about a stage that only the host knows.

An unbound name throws CompositorBindingException naming the node, the kind and the name. Binding what it can and quietly skipping the rest would produce a frame that is missing a pass and reports nothing, which is the failure that takes a day to find.

Fields and properties (44)

  • public const int SupportedVersion

    The schema version this builder understands.

  • public Dictionary<string, RenderView> Views

    Views a node may draw from, by the name the asset uses.

  • public IGraphicsDevice? Device

    What the post-process nodes need and a document cannot carry.

  • public EffectPipelineDescriber? Modules

    Where shader modules come from.

  • public DescriptorAllocator? Descriptors

    Where descriptor sets come from.

  • public SamplerCache? Samplers

    Where samplers come from.

  • public ISunSource? Sun

    Where the frame's directional light comes from, for the nodes that need to point at it.

  • public IPunctualLightSource? Lights

    Where the scene's punctual lights come from, for the node that packs their shadow atlas.

  • public GpuVisibilityGroup? Visibility

    What GPU culling runs on, when a document asks for it.

  • public HiZPyramid? Occluders

    The depth pyramid the HiZ node builds and the culling pass tests against.

  • public GpuDrawArguments? Arguments

    Where the indirect draw arguments go, for a document that asks for them.

  • public GpuClusterVisibility? Clusters

    The cluster traversal a ClusterCulling node dispatches, or null.

  • public MeshletPagePool? Pages

    The pool the traversal's pages live in.

  • public GpuClusterRaster? Raster

    The draw that fills the visibility buffer.

  • public VirtualShadowAtlas? VirtualShadows

    The virtual shadow map a VirtualShadow node fills. Null does nothing.

  • public GpuClusterSoftwareRaster? SoftwareRaster

    The compute raster for the clusters too small to be worth the hardware's.

  • public GpuVisibilityTiles? Tiles

    The binning that sorts its tiles by material.

  • public GpuClusterResolve? Resolve

    The per-material shading that consumes those bins.

  • public GlobalDistanceField? DistanceField

    The clipmap a GlobalDistanceField node composites, or null.

  • public IrradianceField? IrradianceField

    The probe field an IrradianceField node fills, or null.

  • public TracedIrradianceFiller? IrradianceFiller

    What traces radiance into that field on the host, or null for the device filler.

  • public IrradianceFieldFill? IrradianceDeviceFiller

    What traces it on the device, which is what a shipping frame uses.

  • public IrradianceRefinementPolicy? IrradianceRefinement

    Which probes the fill spends its budget on, or null for every probe in turn.

  • public SurfaceCacheStore? SurfaceCache

    The store a SurfaceCache node keeps, or null.

  • public SurfaceCardCapture? SurfaceCacheCapture

    What captures the store's cards at runtime, or null for one captured already.

  • public SurfaceCardCapture.DrawCard? SurfaceCacheDraw

    What that capture draws — the scene, by whoever knows how to draw it.

  • public CardRadiosity? SurfaceCacheRadiosity

    What lights and bounces the cache on the CPU, or null for the dispatches below.

  • public SurfaceCacheLightFill? SurfaceCacheLightFill

    The lighting dispatch — § L4's direct pass on the device.

  • public SurfaceCacheGatherFill? SurfaceCacheGatherFill

    The bounce dispatch, whose record is what advances the cache's swap.

  • public ScreenProbeTraceFill? ScreenProbeTracer

    What traces a ScreenProbeGather node's probes, or null to trace nothing.

  • public ScreenProbeResolve? ScreenProbeResolver

    What resolves the traced probes to spherical harmonics.

  • public ScreenProbeAccumulateFill? ScreenProbeAccumulator

    What folds each frame into the probes' history — the denoiser's temporal half.

  • public ScreenProbeFilterFill? ScreenProbeFilter

    What spreads each accumulated probe over its plane-sharing neighbours.

  • public HiZPyramid? TracePyramid

    The nearest depth chain the screen marches skip by, or null for the fixed-step walk.

  • public EffectSystem? Effects

    Where a node that resolves compute variants gets them, or null.

  • public SceneConstants? SceneConstants

    The frame's per-frame constants, which the resolve's lighting reads.

  • public ViewConstants? ViewConstants

    The frame's per-view constants, on the same terms.

  • public ViewConstants? ViewBlock

    The per-view block this build created, if the document declared one.

  • public Dictionary<string, RenderStage> Stages

    The stages this build created, by name.

  • public IList<ISceneRendererFactory> Factories

    Node kinds this builder can build beyond the ones it knows itself.

  • public GpuDrivenResult GpuDriven

    What the document asked for and the device agreed to, after the last build.

  • public Dictionary<string, SceneRenderer> Nodes

    Every node the document named, by its name.

  • public Dictionary<string, BufferUploadRenderer> Uploads

    The upload nodes this build placed, by name, so a host can give them their bytes.

  • public Dictionary<string, BufferReadbackRenderer> Readbacks

    The readback nodes this build placed, by name, so a host can take their bytes.

Methods (3)

  • public CompositorBuilder(RenderSystem system)

    Turns an authored GraphicsCompositorAsset into a running compositor.

  • public HiZPyramid? TakeTracePyramid()

    Takes the trace pyramid for one more node, deepening its ring to cover every taker.

  • public GraphicsCompositor Build(GraphicsCompositorAsset asset)

    Builds the compositor an asset describes.

Used by (27)

  • ArenaThirdPersonShooter
  • ArenaFrameThirdPersonShooter
  • ArenaIlluminationThirdPersonShooter
  • BuiltThirdPersonShooter.Frame.Tests
  • FrameDocumentTestsThirdPersonShooter.Frame.Tests
  • VirtualGeometryGameVirtualGeometry
  • AppGraphicsVixen.App.Hosting
  • BufferTransferTestsVixen.Rendering.Tests
  • CompositorAssetTestsVixen.Rendering.Tests
  • CompositorContentTestsVixen.Assets.Tests
  • DefaultFrameTestsVixen.Rendering.Tests
  • GpuDrivenCompositorTestsVixen.Rendering.Tests
  • GraphicsCompositorAssetVixen.Rendering
  • HarnessVixen.Rendering.Tests
  • HarnessVixen.Rendering.Tests
  • ISceneRendererFactoryVixen.Rendering
  • PostEffectFactoryVixen.Rendering.PostFx
  • PostEffectTestsVixen.Rendering.PostFx.Tests
  • SceneRenderHostVixen.Engine.Renderer
  • SceneRenderHostTestsVixen.Engine.Renderer.Tests
  • SilentFactoryVixen.Rendering.Tests
  • StrangeFactoryVixen.Rendering.Tests
  • VirtualGeometryDeviceTestsVixen.Graphics.Golden.Tests
  • VirtualGeometrySystemVixen.Rendering
  • WorldRendererVixen.Engine.Renderer
  • WorldRendererTestsVixen.Engine.Renderer.Tests
  • CompositorImporterVixen.Editor.Assets