Vixen
02b45cc4
csharp
public sealed class ReflectionProbeMiss

Doc 06's reflection probes in the miss seat — the caveat's retirement, both halves.

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

Remarks

This is the arrangement that ends "blended against the sky". A probe used to be the whole reflection and faded into nothing but sky at its edge; behind the traced reflections it answers only what the trace missed — the far field it is actually good at — and the fade is a fade between two kinds of far field rather than a reflection disappearing. The near field never fades at all, because it never came from the probe.

One class, two halves. As an IReflectionFallback it answers on the CPU, sampling each probe's CubeImage through the same parallax correction and the same inward-measured weight the shader uses — the reference the kernel's ReflectionProbeMissSource is compared against. Apply writes the device half: the cubes, the volumes and the count, under the slot's qualified names.

Probes are consulted in the order they were added, first non-zero weight wins. The caller sorts by priority — the same contract SceneLighting keeps for the forward pass's array, so the two selections cannot disagree about which probe a position belongs to.

Fields and properties (3)

  • public const int ProbeLimit

    How many probes the shader's arrays hold — its fixed binding count.

  • public Vector3 FarColour

    What lies behind every probe — the sky, one colour.

  • public int Count

    The probes in residence, in consultation order.

Methods (3)

  • public void Add(ReflectionProbe probe, CubeImage radiance)

    Adds a probe and the image its cube was prefiltered from.

  • public Vector3 Miss(Vector3 position, Vector3 direction, float roughness)

    What a reflection ray that escaped the scene sees.

  • public void Apply(ParameterCollection parameters, string shaderName, SamplerHandle sampler)

    Writes the device half — cubes, volumes, count — under the slot's qualified names.

Used by (1)

  • ReflectionTraceDeviceTestsVixen.Graphics.Golden.Tests