public sealed class ScreenProbeTraceFillTraces screen probes with a compute dispatch — doc 19 § L3's gather, first half.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The device half of TracedScreenProbeGather, and checked against it. One workgroup per probe and one invocation per texel, with the probe a group is tracing read out of a job buffer indexed by the group — the same shape as IrradianceFieldFill, because it is the same problem one probe kind over.
The jobs are staged from the atlas, and only for the probes that have a surface. The atlas is where SetSurface and Invalidate already recorded what each anchor pixel showed, so the dispatch has no opinion about the screen at all. ⚠ By default a probe with no surface is not dispatched, and on a mirror the dispatch owns its patch is therefore undefined — nothing uploaded it and nothing traced it. A frame sets ClearInvalid and such probes get a job that writes the invalid mark instead, because the resolve reads validity out of the atlas.
Every binding index comes off the compiled effect rather than the generated constants, and set 2 is filled by hand because the job buffer is a ring and a name-driven write has nowhere to put an offset — both verbatim from the irradiance fill, which learnt them the hard way.
Fields and properties (24)
public const string ShaderNameThe shader this dispatches.
public EffectSystem? EffectsWhere the trace 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 string FarSourceThe shader behind the irradiance slot — where a ray that misses terminates.
public string CacheSourceThe shader behind the cache slot — what a ray that hits a surface sees.
public ParameterCollection ParametersWhat the sets are filled from, by the names the reflection interned.
public float MaxDistanceHow far a ray looks before deciding it hit nothing.
public float SurfaceBiasHow far off its surface a probe stands, in world units.
public Vector3 SkyColourWhat a ray that hit nothing sees, straight ahead.
public Vector3 SkyGradientHow much the sky changes per unit of a direction's y, per channel.
public TextureViewHandle ScreenDepthThe frame's depth, for the trace order's first stage. Invalid traces no screen rays.
public Int2 ScreenViewportThe viewport ScreenDepth covers, in pixels.
public Matrix4x4 ViewProjectionThe camera that drew the depth — the forward matrix, not placement's inverse.
public int ScreenStepsHow many equal steps a screen ray takes over MaxDistance.
public float ScreenThicknessHow deep behind a surface a sample still counts as inside it, in device depth.
public TextureViewHandle ScreenPyramidThe depth's nearest-per-cell chain — HiZPyramid wearing Nearest. Invalid keeps the fixed-step walk.
public int ScreenPyramidLevelsHow many levels the march may use, counting the depth itself — the CPU pyramid's own Levels, which is the chain's plus one.
public float ScreenLinearThicknessHow deep the shell is in view units, where a perspective ray can say. Zero keeps the device-depth shell — ScreenSpaceTrace.LinearThickness, choice for choice.
public bool ClearInvalidWhether probes with no surface get a job that clears their patch to the invalid mark.
public int TracedHow many probes 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 ScreenProbeTraceFill(IGraphicsDevice device)Creates a tracer on a device. Nothing is allocated until the first dispatch.
public int Record(ICommandList commands, ScreenProbeTexture texture)Records a dispatch that traces every valid probe of an atlas.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (7)
- ArenaIlluminationThirdPersonShooter
- AccelerationStructureDeviceTestsVixen.Graphics.Golden.Tests
- CompositorBuilderVixen.Rendering
- PostEffectTestsVixen.Rendering.PostFx.Tests
- ScreenProbeGatherImageTestsVixen.Graphics.Golden.Tests
- ScreenProbeGatherRendererVixen.Rendering.PostFx
- ScreenProbeTraceDeviceTestsVixen.Graphics.Golden.Tests