Vixen
02b45cc4
csharp
public readonly record struct ImpostorView

The camera one cell of an impostor is baked from.

Read the guide page for this →

Remarks

⚠ Orthographic, and that is the whole reason an impostor works at all. A perspective bake fixes the distance the mesh was photographed from into the texture, so an impostor drawn nearer or further shows the wrong parallax. An orthographic one is direction-only, which is what a billboard replays.

⚠ One radius for every cell, taken from the bounding sphere. Fitting each view's own extent would pack the atlas better and would make the impostor breathe as the blend moves between cells, because the same vertex would be a different number of texels from the centre in each.

Fields and properties (4)

  • public Vector3 Direction

    Which way it looks from, normalised.

  • public Matrix4x4 View

    The view matrix.

  • public Matrix4x4 Projection

    The orthographic projection.

  • public float Radius

    How far the mesh reaches from its centre, which is the ortho half-extent.

Methods (2)

Used by (5)

  • ImpostorBakeVixen.Rendering
  • ImpostorBakeCellVixen.Rendering
  • ImpostorBakeTestsVixen.Rendering.Tests
  • ImpostorCapturePassVixen.Rendering
  • ImpostorTestsVixen.Rendering.Tests