public sealed class ReflectionTraceFillTraces reflections per texel with a compute dispatch — doc 19 § L5's device half.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The device half of TracedReflections, and checked against it texel by texel. Every composed answer comes through the slots the kernels already share: the march through distanceField, the hit through surfaceCache, the rough read through irradiance, and the miss through miss — the seat doc 06's reflection probes take without this kernel changing a line.
The input planes and the target are the caller's — world positions with validity, normals with roughness, and the storage image the answer lands in. This binds and dispatches; the textures' states are whoever owns them's to arrange, with the target in PlaneIsBeingWritten across the dispatch, the way every written plane here is bracketed.
Fields and properties (31)
public const string ShaderNameThe shader this dispatches.
public EffectSystem? EffectsWhere the 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 mirror rays actually march.
public string CacheSourceThe shader behind the cache slot — what a hit answers with.
public string RoughSourceThe shader behind the irradiance slot — what the rough path reads.
public string MissSourceThe shader behind the miss slot — the far field, which is the probes' seat.
public ParameterCollection ParametersWhat the sets are filled from, by the names the reflection interned.
public TextureViewHandle PositionsThe reflecting surfaces: world position in xyz, validity in alpha.
public TextureViewHandle NormalsTheir normals in xyz, roughness in alpha.
public TextureViewHandle TargetThe storage image the answer lands in.
public Int2 ViewportHow many texels the planes cover.
public Vector3 CameraPositionWhere the camera stands — the view direction is toward the surface.
public float MaxDistanceHow far a mirror ray looks before deciding it escaped.
public float BiasHow far off its surface a mirror ray starts.
public float RoughnessThresholdThe roughness at and above which the field answers instead of the trace.
public float RoughnessBlendHow far below the threshold the cross-fade starts. Zero is the hard switch.
public TextureViewHandle ScreenDepthThe frame's depth, for the screen march — invalid for no screen trace at all.
public TextureViewHandle ScreenColourThe frame's colour, which is what a screen hit reflects.
public Matrix4x4 ViewProjectionThe camera that drew both — the forward matrix.
public Int2 ScreenViewportThe viewport they cover, in pixels.
public int ScreenStepsHow many equal steps a screen ray takes. Written as zero while either view is invalid, so the descriptors can hold a stand-in the kernel never loads.
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 ReconstructFromDepthWhether positions come from ScreenDepth rather than a positions plane.
public Matrix4x4 InverseViewProjectionWhat turns a pixel's depth back into the world, when reconstructing.
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 ReflectionTraceFill(IGraphicsDevice device)Creates a reflection pass on a device. Nothing is allocated until the first dispatch.
public int Record(ICommandList commands)Records a dispatch that reflects every valid texel of the planes.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (4)
- ArenaIlluminationThirdPersonShooter
- ReflectionRendererVixen.Rendering.PostFx
- ReflectionRendererDeviceTestsVixen.Graphics.Golden.Tests
- ReflectionTraceDeviceTestsVixen.Graphics.Golden.Tests