Vixen
02b45cc4
csharp
public struct IrradianceFillJob

One brick to fill, laid out as IrradianceFill.rvn's IrradianceFillJob.

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

Remarks

Explicit offsets, copied from the reflection rather than left to the runtime. The shader's struct is std430: three float3-shaped members, each rounded up to sixteen bytes, forty-eight in all. Sequential layout of three twelve-byte fields is thirty-six, and every job after the first would then be read from the middle of the one before it — which reads as a field where one brick is right and the rest are lit from nowhere.

The offsets are asserted against IrradianceFill.reflect.json by a test, because a struct that agrees with a comment is a struct that agrees with nothing.

Fields and properties (4)

  • public const int Stride

    How many bytes from one job to the next.

  • public Int3 Origin

    Where the brick's footprint starts in the pool, in texels.

  • public Vector3 Position

    Where its probe (0, 0, 0) stands, in world space.

  • public Vector3 Spacing

    How far apart its probes are. A quarter of the brick, not a fifth.

Used by (2)

  • IrradianceFieldFillVixen.Rendering
  • IrradianceFillJobTestsVixen.Rendering.Tests