Vixen
02b45cc4
csharp
public sealed class SurfaceCacheLightFill

Lights the surface cache with a compute dispatch — doc 19 § L4's direct pass.

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

Remarks

The device half of CardRadiosity.Light, and checked against it. One invocation per texel and one group-z per card: the card buffer is the job list, because the radiosity relights every resident card every pass — no cursor, no budget, the way the probe fills have them, since a card missing a pass is a card whose bounce lags the scene.

It is not a ComputeRenderer, and cannot be — the atlas planes are not graph resources; they are named into descriptor sets. The same shape IrradianceFieldFill is, for the same reason, and every binding index comes off the compiled effect rather than the generated constants for the same reason too: a different source behind distanceField renumbers everything after it.

Fields and properties (13)

  • 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 shadow rays actually march.

  • public ParameterCollection Parameters

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

  • public Vector3 TowardSun

    From the surface toward the sun, normalised by the caller.

  • public Vector3 SunIrradiance

    The sun's irradiance on a perpendicular surface.

  • public float MaxDistance

    How far a shadow ray looks before deciding it escaped.

  • public float Bias

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

  • public int Lit

    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 SurfaceCacheLightFill(IGraphicsDevice device)

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

  • public int Record(ICommandList commands, SurfaceCacheTexture texture)

    Records a dispatch that lights 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