csharp
public readonly record struct ImpostorViewThe camera one cell of an impostor is baked from.
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)
Methods (2)
public ImpostorView(Vector3 Direction, Matrix4x4 View, Matrix4x4 Projection, float Radius)The camera one cell of an impostor is baked from.
public static ImpostorView For(ImpostorGrid grid, ImpostorCell cell, Vector3 centre, float radius)The camera for one cell of a grid, around a mesh's bounding sphere.
Used by (5)
- ImpostorBakeVixen.Rendering
- ImpostorBakeCellVixen.Rendering
- ImpostorBakeTestsVixen.Rendering.Tests
- ImpostorCapturePassVixen.Rendering
- ImpostorTestsVixen.Rendering.Tests