Vixen
dd8b0a81
csharp
public readonly record struct ShadowTile

One tile of the punctual shadow atlas: what it renders, and where it lives in it.

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

Remarks

⚠ Slot is not the tile's position in Tiles and has not been since the tiles could be kept. A cached lamp holds the slot it was drawn into for as long as it does not move, so the packing is no longer dense in list order and every viewport, scissor and record index has to come from this rather than from a loop counter. It is carried rather than derived because Offset is the same fact in fractions and two derivations of one quantity is how an atlas comes to be read a tile along.

Fields and properties (6)

  • public int Light

    Which light in the renderer's list.

  • public CubeFace? Face

    Which cube face, or for a spot light's single tile.

  • public Matrix4x4 ViewProjection

    World to this tile's clip space.

  • public Vector2 Scale

    How much of the atlas the tile is, as a fraction.

  • public Vector2 Offset

    Where it starts in the atlas, as a fraction.

  • public int Slot

    Which of the atlas's Capacity slots it occupies.

Methods (1)

  • public ShadowTile(int Light, CubeFace? Face, Matrix4x4 ViewProjection, Vector2 Scale, Vector2 Offset, int Slot = 0)

    One tile of the punctual shadow atlas: what it renders, and where it lives in it.

Used by (3)

  • PunctualShadowCacheTestsVixen.Rendering.Tests
  • PunctualShadowRendererVixen.Rendering
  • PunctualShadowTestsVixen.Rendering.Tests