DirectionalLightclass

A directional light that casts shadows, like the sun.

objectLightDirectionalLight
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public class Sandbox.DirectionalLight : Sandbox.Light

Constructors1

Showing 1 constructors

Methods3

Showing 3 methods

protected virtual void DrawGizmos()PROTECTEDVIRTUAL

Returns:void

protected virtual void OnAwake()PROTECTEDVIRTUALLIFECYCLE

Returns:void

Properties4

Showing 4 properties

public int Sandbox.DirectionalLight.ShadowCascadeCount { get; set; }PUBLICGETSET

Number of cascades to split the view frustum into for the whole scene dynamic shadow. More cascades result in better shadow resolution, but adds significant rendering cost. User settings will set a maximum.

Returns:int

public float Sandbox.DirectionalLight.ShadowCascadeSplitRatio { get; set; }PUBLICGETSET

Controls how cascades 2+ are distributed between the first cascade boundary and the far clip. 0 is uniform, 1 is fully logarithmic.

Returns:float

public Color Sandbox.DirectionalLight.SkyColor { get; set; }PUBLICGETSET

Color of the ambient sky color This is kept for long term support, the recommended way to do this is with an Ambient Light component.

Returns:Color

On this page