Vixen
02b45cc4
csharp
public struct SurfaceCacheCardData

One card as SurfaceCache.rvn's SurfaceCacheCard lays it out.

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: two float3-shaped members each rounded to sixteen bytes, two int2s, an int, sixty-four in all — where sequential layout of the same fields is fifty-two, and every card after the first would then be read from the middle of the one before it. The device tests assert these numbers against SurfaceCacheGather.reflect.json, because a struct that agrees with a comment agrees with nothing.

Fields and properties (6)

  • public const int Stride

    How many bytes from one card to the next.

  • public Vector3 Centre

    The centre of its box, in world space.

  • public Vector3 HalfSize

    The box's half-extents, world-axis aligned.

  • public Int2 Origin

    Where the card's texels start in the atlas.

  • public Int2 Resolution

    Texels along the card's U and V.

  • public int Axis

    Which of the six directions it faces, 0 to 5.

Methods (1)

Used by (2)

  • SurfaceCacheRadiosityDeviceTestsVixen.Graphics.Golden.Tests
  • SurfaceCacheTextureVixen.Rendering