public static class ShadowProjectionsThe transforms a spot light and a point light are shadowed from.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Where ShadowCascades has to invent a volume — a directional light has no position, so a cascade is fitted to the camera and everything hard about it follows from that — a punctual light already is one. A spot light's shadow frustum is its cone; a point light's is six of them. There is nothing to stabilise, because nothing moves when the camera does.
Which is why these are a handful of lines and cascades are two hundred: the difficulty in cascaded shadow maps was never the projection.
Fields and properties (1)
public const float MaximumConeAngleThe widest cone that can still be rendered with one perspective projection.
Methods (5)
public static Matrix4x4 Spot(Vector3 position, Vector3 direction, float outerAngle, float range, float near = 0.05)The world-to-clip transform a spot light casts through.
public static Matrix4x4 Cube(Vector3 position, CubeFace face, float range, float near = 0.05)The world-to-clip transform one face of a point light's cube map casts through.
public static (Vector3 Forward, Vector3 Up) CubeAxes(CubeFace face)Which way a cube face looks, and which way is up on it.
public static int TileCount(LightKind kind)How many shadow tiles a light of this kind needs.
public static Matrix4x4 Tile(in Matrix4x4 viewProjection, Vector2 scale, Vector2 offset)The same transform, landing in one tile of an atlas instead of in the whole texture.
Used by (6)
- CubeMappingVixen.Rendering
- IrradianceBounceDeviceTestsVixen.Graphics.Golden.Tests
- IrradianceCubeCaptureVixen.Rendering
- PunctualShadowRendererVixen.Rendering
- PunctualShadowTestsVixen.Rendering.Tests
- ShadowCascadesVixen.Rendering