public sealed class GraphicsCompositorThe frame's structure: which views exist, which stages they draw, and into what.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The third of the three ideas docs/plan/06 takes from Stride verbatim, and the last to be built. The frame is data the user edits, not code. "Swap forward for deferred" is a different tree of SceneRenderers rather than a different build of the engine, and the three shipped presets — Forward+, deferred, mobile forward — are three assets over the same features.
Collect runs before the render system, and that ordering is the design. Views are declared by the nodes that draw them, so the frame's view list is derived from the compositor rather than handed to it: a shadow cascade exists because something draws it, and a stage is in a view's mask because a node asked for it. A host that set the mask itself would eventually set one nothing draws, and pay for culling into a list nobody reads.
What is not here is the render graph. A node names its own attachments today, where later it will name a transient resource and let barriers and aliasing be derived — but that changes where a RenderPassRenderer gets its textures, not the shape of this tree.
Fields and properties (8)
public RenderSystem SystemThe render system this composes a frame for.
public SceneRenderer? GameThe root of the graph — the whole frame.
public IReadOnlyList<RenderView> ViewsThe views this frame's collect phase declared, in first-use order.
public Dictionary<string, ImportedTexture> ImportsTextures the host lends the frame, by the name the tree refers to them by.
public Dictionary<string, ImportedBuffer> BufferImportsBuffers the host lends the frame, by name.
public IList<RenderResourceAsset> ResourcesTransient resources the frame declares, by name.
public IList<RenderBufferAsset> BufferResourcesTransient buffers the frame declares, by name.
public Int2 FrameSizeThe frame's reference size, which a scaled resource is a fraction of.
Methods (6)
public GraphicsCompositor(RenderSystem system)The frame's structure: which views exist, which stages they draw, and into what.
public int Apply(in PostProcessOverlay overlay)Lays a frame's post-process overlay over every node that takes one.
public void Use(RenderView view)Declares that this frame uses a view. Idempotent.
public void Use(RenderView view, RenderStage stage)Declares that this frame draws a stage from a view.
public CompositorFrame Build(RenderGraph graph, EffectSystem effects, IGraphicsDevice? device = null)Runs a whole frame: collect, the render system's phases, then declare the graph's passes.
public void Collect()Runs the collect phase alone and hands the views to the render system.
Used by (78, showing 40)
- BuiltThirdPersonShooter.Frame.Tests
- FrameDocumentTestsThirdPersonShooter.Frame.Tests
- AppGraphicsVixen.App.Hosting
- AutoExposureRendererVixen.Rendering.PostFx
- AutoExposureTestsVixen.Rendering.PostFx.Tests
- BloomRendererVixen.Rendering.PostFx
- BloomTestsVixen.Rendering.PostFx.Tests
- BufferReadbackRendererVixen.Rendering
- BufferTransferDeviceTestsVixen.Graphics.Golden.Tests
- BufferTransferTestsVixen.Rendering.Tests
- BufferUploadRendererVixen.Rendering
- ClusterCullingDeviceTestsVixen.Graphics.Golden.Tests
- ClusterCullingRendererVixen.Rendering
- ClusteredLightingTestsVixen.Rendering.Tests
- ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
- CompositorAssetTestsVixen.Rendering.Tests
- CompositorBuilderVixen.Rendering
- CompositorContentTestsVixen.Assets.Tests
- CompositorImageTestsVixen.Graphics.Golden.Tests
- ComputeRendererVixen.Rendering
- DefaultFrameTestsVixen.Rendering.Tests
- DelegateSceneRendererVixen.Rendering
- DepthPrepassTestsVixen.Rendering.Tests
- DescriptorBindingTestsVixen.Rendering.Tests
- DistanceFieldAoImageTestsVixen.Graphics.Golden.Tests
- ForwardFrameTestsVixen.Rendering.Tests
- FrameVixen.Rendering.Tests
- FullScreenRendererVixen.Rendering
- GlobalDistanceFieldRendererVixen.Rendering
- GpuCullingRendererVixen.Rendering
- GpuVisibilityGroupTestsVixen.Rendering.Tests
- GraphicsCompositorTestsVixen.Rendering.Tests
- HarnessVixen.Rendering.PostFx.Tests
- HarnessVixen.Rendering.Tests
- HarnessVixen.Rendering.PostFx.Tests
- HarnessVixen.Rendering.PostFx.Tests
- HarnessVixen.Rendering.Tests
- HarnessVixen.Rendering.Tests
- HarnessVixen.Rendering.Tests
- HarnessVixen.Rendering.Tests