Vixen
02b45cc4
csharp
public sealed class SurfaceCacheGatherFill

The bounce over the cards as a compute dispatch — doc 19 § L4's radiosity pass.

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

Remarks

The device half of CardRadiosity.Gather, and checked against it. Every valid texel casts the reference's own Hammersley rays; a hit asks the composed surfaceCache slot what the surface radiates — SurfaceCacheSource reading the front of the double buffer while the dispatch writes the back — and the host swaps with SwapGather after the queue settles, the mirror of SurfaceCacheStore.SwapGathered.

Iterating this to a fixed point is the infinite-bounce look, and each pass is one recorded dispatch: light once, then gather-and-swap until the change the readback shows drops below whatever the caller calls converged — the same loop the Cornell test runs on the CPU, pass for pass.

Fields and properties (14)

  • public const string ShaderName

    The shader this dispatches.

  • public EffectSystem? Effects

    Where the variant is resolved from. Null dispatches nothing.

  • public ComputePipelineCache? Pipelines

    Where the compute pipeline comes from. Null dispatches nothing.

  • public DescriptorAllocator? Descriptors

    Where the descriptor sets come from. Null dispatches nothing.

  • public string Source

    The shader behind the field slot — what the gather rays actually march.

  • public string CacheSource

    The shader behind the cache slot — what a hit answers with.

  • public ParameterCollection Parameters

    What the two sets are filled from, by the names the reflection interned.

  • public int Rays

    How many rays each texel's gather casts.

  • public float MaxDistance

    How far a gather ray looks before deciding it escaped.

  • public float Bias

    How far off its surface a ray starts, in world units.

  • public Vector3 SkyColour

    What an escaping ray sees. Black is a closed scene.

  • public int Gathered

    How many cards have been dispatched over.

  • public int Dispatches

    How many dispatches have been recorded.

  • public string? Skipped

    Why the last call recorded nothing, or null when it recorded something.

Methods (3)

  • public SurfaceCacheGatherFill(IGraphicsDevice device)

    Creates a bounce pass on a device. Nothing is allocated until the first dispatch.

  • public int Record(ICommandList commands, SurfaceCacheTexture texture)

    Records one bounce over every resident card.

  • public void Dispose()

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

Used by (7)

  • ArenaThirdPersonShooter
  • ArenaIlluminationThirdPersonShooter
  • CompositorAssetTestsVixen.Rendering.Tests
  • CompositorBuilderVixen.Rendering
  • SurfaceCacheRadiosityDeviceTestsVixen.Graphics.Golden.Tests
  • SurfaceCacheRendererVixen.Rendering
  • SurfaceCacheRendererDeviceTestsVixen.Graphics.Golden.Tests