Class SunCascades
Namespace: ValveResourceFormat.Renderer.World
Assembly: Renderer.dll
Sun shadow cascades fitted to a camera.
public sealed class SunCascadesInheritance
object ← SunCascades
Fields
Count
Number of sun shadow cascades, the tightest first.
public const int Count = 2Field Value
int
Properties
ActiveCount
Gets the number of cascades in use after the last SunCascades.Fit(Scene, Camera, float).
public int ActiveCount { get; }Property Value
int
Cameras
Gets the orthographic camera of each cascade.
public Camera[] Cameras { get; }Property Value
Camera[]
CastDirection
Gets the normalized direction sun light travels, away from the sun.
public Vector3 CastDirection { get; }Property Value
ShadowBias
Gets the depth bias applied to sun light shadows to reduce self-shadowing artifacts.
public float ShadowBias { get; }Property Value
float
Methods
Fit(Scene, Camera, float)
Fits the SunCascades.Cameras to a camera, with a depth range wide enough to cull casters in.
public void Fit(Scene scene, Camera camera, float shadowMapSize)Parameters
scene Scene
camera Camera
shadowMapSize float
FitDepthRange(int, float, float)
Tightens the depth range of a cascade to the extent of its casters along SunCascades.CastDirection.
public void FitDepthRange(int cascade, float casterMin, float casterMax)Parameters
cascade int
casterMin float
casterMax float

