public sealed class TracedReflectionsReflections through the same tracer — doc 19 § L5, reference half.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The layer that reuses everything below it, which is § L5's whole argument. A mirror ray marches L1's tracer — the same march every filler and gather here marches — and a hit answers through IRadianceSource, which is L4's seam: hand this the surface cache's SurfaceCacheRadiance and a reflection carries direct light, emissive and every bounce the radiosity folded in, with no code in this package knowing the cache exists. A miss asks the IReflectionFallback, which is where doc 06's reflection probes plug in as the far field they are actually good at.
Rough reflections read the field instead of tracing. At and above RoughnessThreshold the lobe is wide enough that one mirror ray is noise rather than an answer, and the cosine-weighted average the irradiance field already stores — evaluated about the mirror direction rather than the normal — is the wide-lobe limit of the same integral, amortised across every rough surface in the scene. That is Lumen's arrangement and doc 19 § L5's sentence, and it is a hard threshold here because a hard threshold is a testable one: the blend band between the two answers is the device half's concern, named below.
The view convention is incident. view points from the camera toward the surface, so the mirror direction is the textbook v − 2(v·n)n. Handing this the direction from the surface to the camera reflects the camera instead of the scene — the picture looks plausible and is wrong everywhere, which is why the convention is stated on the parameter and pinned by a closed form.
Fields and properties (7)
public float MaxDistanceHow far a mirror ray looks before deciding it escaped.
public float BiasHow far off its surface a mirror ray starts, in world units.
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, in roughness.
public IrradianceField? FieldThe irradiance field the rough path reads — doc 19 § L2's, when the scene has one.
public ScreenSpaceTrace? ScreenTraceThe screen march the sharp path runs first, or null for the field alone.
public Func<Int2, Vector3>? ScreenColourThe frame's colour at a pixel, for what a screen hit reflects.
Methods (2)
public TracedReflections(IDistanceField geometry, IRadianceSource radiance, IReflectionFallback fallback)Reflections through the same tracer — doc 19 § L5, reference half.
public Vector3 Reflect(Vector3 position, Vector3 normal, Vector3 view, float roughness)What a surface reflects toward the camera.
Used by (3)
- ReflectionRendererDeviceTestsVixen.Graphics.Golden.Tests
- ReflectionTraceDeviceTestsVixen.Graphics.Golden.Tests
- TracedReflectionTestsVixen.Rendering.Reflections.Tests