Vixen
02b45cc4
csharp
public sealed class RenderPassRenderer

A render pass, and the renderers that draw into it.

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

Remarks

The node that resolves what a stage deliberately does not: a stage is which objects and in what order, a pass is where they land. One stage feeds several passes and one pass draws several stages, so the compositor is where the two meet.

It declares a pass rather than opening one. Targets are named, and the render graph decides what they are: how big, whether two of them can share memory, whether the contents ever have to reach memory at all, what barriers precede the pass, and whether the pass is worth running. A node that called BeginRenderPass itself would be answering all of those with "I do not know".

Reads is not optional bookkeeping. A pass that samples the shadow atlas must say so, because that read is the edge that orders the shadow pass before it and puts a barrier between them — and, if nothing says so, the edge that keeps the shadow pass from being culled for producing something nobody wanted.

There is still no separate "clear" renderer: clearing is a load action on an attachment. Issuing it as its own operation costs a tile-based GPU a full extra pass writing a colour the next pass overwrites.

Fields and properties (20)

  • public IList<string> ColourTargets

    The names of its colour attachments, in the order the shader writes them.

  • public string? DepthTarget

    The name of its depth attachment, or null for a pass with none.

  • public IList<string> Reads

    The names of textures this pass samples.

  • public IList<string> BufferReads

    The names of buffers it reads.

  • public LoadAction Load

    What to do with the colour attachments at the start of the pass.

  • public ISet<string> Loaded

    Which colour attachments keep what is in them, whatever Load says.

  • public Color4 ClearColour

    What to clear them to.

  • public LoadAction DepthLoad

    What to do with depth at the start of the pass.

  • public float ClearDepth

    What to clear depth to. Zero is far under the engine's reversed-Z convention.

  • public bool ReadOnlyDepth

    Whether the pass only tests depth, which lets a shader sample it at the same time.

  • public int SampleCount

    How many samples its attachments have.

  • public Viewport? Viewport

    The viewport to set, or null for the whole target.

  • public DescriptorBindings Descriptors

    The set the pass binds once, before anything under it draws.

  • public SamplerCache? Samplers

    Where a described sampler comes from, for a binding that names one by value.

  • public IDictionary<string, string> SceneTextures

    Frame textures this pass hands to the scene's set, as the shader's name for the binding against the frame's name for the resource.

  • public IDictionary<string, string> SceneBuffers

    Frame buffers it hands to the scene's set, on the same terms.

  • public string ShaderName

    Which pass's names the published resources are qualified by.

  • public SceneConstants? SceneConstants

    The frame's set for whatever draws in this pass, or null for a pass that binds none.

  • public IList<SceneRenderer> Children

    What draws into this pass.

  • public override IReadOnlyList<SceneRenderer> Nested

    The nodes underneath this one, for a walk over the whole frame.

Methods (2)

  • protected internal override void Collect(GraphicsCompositor compositor)

    Declares the views and stages this node needs, before anything is culled.

  • protected internal override void Build(GraphicsCompositor compositor, CompositorFrame frame)

    Declares this node's render-graph passes.

Used by (22)

  • FrameDocumentTestsThirdPersonShooter.Frame.Tests
  • ClusteredLightingTestsVixen.Rendering.Tests
  • ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
  • CompositorAssetTestsVixen.Rendering.Tests
  • CompositorBuilderVixen.Rendering
  • CompositorContentTestsVixen.Assets.Tests
  • CompositorImageTestsVixen.Graphics.Golden.Tests
  • DepthPrepassTestsVixen.Rendering.Tests
  • DescriptorBindingTestsVixen.Rendering.Tests
  • DistanceFieldAoImageTestsVixen.Graphics.Golden.Tests
  • ForwardFrameTestsVixen.Rendering.Tests
  • FrameVixen.Rendering.Tests
  • GpuVisibilityGroupTestsVixen.Rendering.Tests
  • GraphicsCompositorTestsVixen.Rendering.Tests
  • HarnessVixen.Rendering.Tests
  • IndirectDiffuseImageTestsVixen.Graphics.Golden.Tests
  • IrradianceShadingDeviceTestsVixen.Graphics.Golden.Tests
  • ParticleSpriteDeviceTestsVixen.Graphics.Golden.Tests
  • ScreenProbeGatherImageTestsVixen.Graphics.Golden.Tests
  • ScreenProbeUpsampleImageTestsVixen.Graphics.Golden.Tests
  • VirtualGeometryGoldenTestsVixen.Graphics.Golden.Tests
  • PickingRendererVixen.Editor.SceneView