Vixen
02b45cc4
csharp
public sealed class ScreenProbeGatherRenderer

Doc 19 § L3's gather as one compositor node: place, trace, resolve, upsample.

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

Remarks

The node that schedules the screen-probe passes as one graph. Each half exists and is tested alone — ScreenProbeTraceFill against the CPU gather, ScreenProbeResolve against the CPU projection, ScreenProbeUpsampleRenderer against the CPU lattice walk — and this owns none of that arithmetic. It owns the ordering: probes are placed from what the frame drew, the trace and resolve run in one compute pass, the resolved planes enter the graph as imports, and the upsample draws them. The same division of labour as IrradianceFieldRenderer, one probe kind over.

Placement reads the depth buffer of a frame that has finished. The anchors' depths and normals live on the device, so this node copies them back every frame and places probes from the copy Latency frames old — a probe lattice one frame behind the camera, which the temporal half of the denoiser will meet again as reprojection. The matrix that reconstructs a copy is the matrix snapshotted with it: this frame's camera against last frame's depth reconstructs surfaces that exist nowhere.

The tracer and resolver are the host's, and only ordered here. What the rays march and what the sky is are questions about the scene — Tracer carries its composed sources and parameters exactly as DeviceFiller does. One thing is imposed: ClearInvalid is switched on, because on an atlas the dispatch owns, the patch of a probe nothing placed is undefined memory and the resolve reads validity out of it.

⚠ The lattice is sized on the first build and a resized frame is refused. Rebuilding the textures mid-flight while frames still reference them is a use-after-free with latency; until resizing exists as a deliberate step, a host that resizes recreates the node. Owed with the rest of the renderer integration.

Fields and properties (28)

  • public required string Depth

    The depth the probes stand on — and the sky test, in its .r.

  • public required string Normals

    The normals the probes are biased along, encoded as the G-buffer stores them.

  • public string Output

    The name the upsampled irradiance is published under.

  • public IGraphicsDevice? Device

    The device everything is created on, or null to take the frame's.

  • public SamplerCache? Samplers

    Where the upsample's samplers come from.

  • public DescriptorAllocator? Allocator

    Where the upsample's descriptor sets come from.

  • public ScreenProbeTraceFill? Tracer

    What traces the probes — the host's, with its sources and sky. Null traces nothing.

  • public ScreenProbeResolve? Resolver

    What resolves them to spherical harmonics. Null resolves nothing.

  • public ScreenProbeAccumulateFill? Accumulator

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

  • public string? AccumulateSkipped

    Why the accumulator recorded nothing last frame, or null.

  • public ScreenProbeFilterFill? SpatialFilter

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

  • public string? FilterSkipped

    Why the spatial filter recorded nothing last frame, or null.

  • public float PlaneTolerance

    How far off a probe's plane a pixel may stand and still read it, in world units.

  • public Matrix4x4 InverseViewProjection

    This frame's camera — the inverse of the view-projection the frame draws with.

  • public Matrix4x4 ViewProjection

    This frame's camera, forward — what the screen trace projects its samples with.

  • public RenderView? View

    The view whose camera drives the pair above, or null for a host that sets them.

  • public bool ScreenTraces

    Whether the trace's first stage marches the frame's own depth buffer.

  • public HiZPyramid? Pyramid

    The nearest chain the screen trace skips by, or null for the fixed-step walk.

  • public float ScreenLinearThickness

    How deep the trace's shell is in view units, where a perspective ray can say. Zero keeps the device-depth shell — forwarded to ScreenLinearThickness.

  • public int TileSize

    How many pixels one probe stands for, along each axis.

  • public float Intensity

    A multiplier on the upsampled result.

  • public int Latency

    How many frames between a depth copy and placing probes from it.

  • public ScreenProbeTexture? Texture

    The mirror this node keeps — the atlas texture and the resolved planes.

  • public ScreenProbeUpsampleRenderer? Upsample

    The upsample child, for a host that wants to look at what it drew.

  • public int Placed

    How many probes stood on a surface at the last placement.

  • public int Placements

    How many placements have run — zero until the first depth copy comes back.

  • public string? TraceSkipped

    Why the tracer recorded nothing last frame, or null.

  • public string? ResolveSkipped

    Why the resolver recorded nothing last frame, or null.

Methods (3)

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

    Declares this node's render-graph passes.

  • public void Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

  • public void Reset()

    Forgets the lattice, so the next build lays a new one at the frame's size.

Used by (5)

  • ArenaThirdPersonShooter
  • AmbientCombineTestsVixen.Rendering.PostFx.Tests
  • PostEffectFactoryVixen.Rendering.PostFx
  • PostEffectTestsVixen.Rendering.PostFx.Tests
  • ScreenProbeGatherImageTestsVixen.Graphics.Golden.Tests