public sealed class IrradianceFieldFillFills an irradiance field's probes with a compute dispatch — doc 19 § L2's filler A.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The device half of TracedIrradianceFiller, and checked against it. One workgroup per brick and one invocation per probe: sixty-four threads marching sixty-four rays each, with the brick a group is filling read out of a job buffer indexed by the group. That is what lets one dispatch refill N bricks rather than N dispatches, and N is Budget's number.
It is not a ComputeRenderer, and cannot be. That node binds resources by graph name; the pool volumes are not graph resources — they are named into a descriptor set — so nothing in the graph can see them and nothing else will transition them. This is the same shape HiZPyramid is, for the same reason.
Every binding index comes off the compiled effect rather than the generated constants. Those describe one variant — the reflection checked in beside the shader was produced with GlobalDistanceField filling the slot — and a different implementation behind distanceField may declare resources of its own, which renumbers everything after them. The names are safe and are what this asks by; the numbers are the compilation's.
The dispatch writes the sixty-four probes a brick owns and nothing else, which is exactly what the reference filler writes — so the two can be compared to the last coefficient. The border plane and the repair of invalid probes belong to IrradianceFieldRepair, which this owns and runs after every fill, in the order Dilate and SyncBorders insist on. One call rather than two, because a fill without its repair leaves a rind and a seam that read as lighting bugs rather than as a missing line.
Fields and properties (17)
public const string ShaderNameThe shader this dispatches.
public IrradianceFieldRepair RepairThe dilation and border sync that run after every fill.
public EffectSystem? EffectsWhere the fill variant is resolved from. Null dispatches nothing.
public ComputePipelineCache? PipelinesWhere the compute pipeline comes from. Null dispatches nothing.
public DescriptorAllocator? DescriptorsWhere the descriptor sets come from. Null dispatches nothing.
public string SourceThe shader behind the field slot — what the rays actually march.
public ParameterCollection ParametersWhat the two sets are filled from, by the names the reflection interned.
public int RayCountHow many directions each probe looks in.
public float MaxDistanceHow far a ray looks before deciding it hit nothing.
public Vector3 SkyColourWhat a ray that hit nothing sees.
public Vector3 SunDirectionWhich way the sun is, in world space.
public float SunSoftnessThe reciprocal of the sun's angular radius. Larger is a sharper shadow.
public float HysteresisHow much of the previous answer survives a fill, from zero to one.
public int CursorWhich indirection cell the next dispatch starts at.
public int FilledHow many bricks have been dispatched since this was made.
public int DispatchesHow many dispatches have been recorded.
public string? SkippedWhy the last call recorded nothing, or null when it recorded something.
Methods (3)
public IrradianceFieldFill(IGraphicsDevice device)Creates a filler on a device. Nothing is allocated until the first dispatch.
public int Record(ICommandList commands, IrradianceField field, IrradianceFieldTexture texture, int budget)Records a dispatch that refills up to bricks.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (4)
- CompositorBuilderVixen.Rendering
- IrradianceFieldRendererVixen.Rendering
- IrradianceFillDeviceTestsVixen.Graphics.Golden.Tests
- IrradianceShadingDeviceTestsVixen.Graphics.Golden.Tests