Version:

# Directional Light Component

The Directional Light component casts light from an infinitely distant point towards a single direction, similar to sunlight. This component also supports shadow casting.

Atom Gem

## Directional Light Properties

PropertyDescriptionValuesDefault
ColorThe color of the light. The color acts as a mask or gel on a perfectly white light source. For instance, a 1000 lux light with a white color will actually be 1000 lux, but a 1000 lux light with an 18% gray color will only be 180 lux.Color255, 255, 255
Intensity modeAllows specifying light values in lux or EV100. Lux is a linear light value while EV100 is logarithmic (similar to camera stops).Lux or Ev100Ev100
IntensityIntensity of the light in the photometric unit set by Intensity mode.Any number for Ev100, any positive number for Lux4.0
Angular diameterThe angular diameter of the light source in degrees. This is used to make sure specular highlights from directional lights don’t completely disappear on mirror-smooth surfaces. The angular diameter of the Sun as viewed from Earth is about 0.5°.0.0 - 5.00.5

| Shadow | Refer to Shadow properties below. | | | | Global Illumination | Refer to Global Illumination properties below. | | |

PropertyDescriptionValuesDefault
CameraThe entity of the camera the shadows will be visible from. Used to calculate the view frustums for shadow cascades.EntityIdNone
Shadow far clipThe distance to the far clip plane of the shadow. This is the maximum distance from the light source that shadows can cast.0 to Infinity100.0
Shadowmap sizeThe texture width and height of each shadow map cascade.256, 512, 1024, 20481024
Cascade countThe number of shadow cascades.1 - 44
Automatic splittingIf enabled, the Split ratio is used, otherwise the Far depth cascade values are used.BooleanEnabled
Split RatioRatio between linear (0) and logarithmic (1) splitting schemes for the shadow cascades.0.0 - 1.00.9
Far depth cascadeThe far depth of each cascade with x/y/z/w being for cascade 1/2/3/4. Unused cascades are ignored when cascade count is less than 4.0.0 to Shadow far clipX: 25.0, Y: 50.0, Z: 75.0, W: 100.0
Ground heightThe height of the ground relative to the camera used to correct position of cascades.-Infinity to Infinity0.0
Cascade correctionIf enabled, shadow cascades will be adjusted to optimize the appearance for certain camera positions.BooleanDisabled
Debug coloringIf enabled, shadow cascades will be colored to see their placement. Red, green, blue, and yellow are used to show cascades 1 to 4.BooleanDisabled
Shadow filter methodFiltering method of edge-softening of shadows.
• None: No filtering
• PCF: Percentage-closer filtering
• ESM: Exponential shadow maps
• ESM+PCF: ESM with a PCF fallback
None, PCF, ESM, ESM+PCFNone
Filtering sample countThe number of samples to use when filtering a shadow along an edge. Only applies to PCF and ESM+PCF.4 - 6432
Shadow Receiver Plane Bias EnableIf enabled, the plane of the shadow receiver is adjusted to reduce shadow acne on large PCF kernels.BooleanEnabled
Shadow BiasReduces acne by applying a fixed bias along the z axis in shadow-space.0.0 - 0.20.0015
Normal Shadow BiasReduces acne by biasing the shadow map lookup along the geometric normal.0.0 - 10.02.5
Blend between cascadesIf enabled, shadow cascades blend smoothly with each other.BooleanDisabled
Fullscreen BlurIf enabled, a full-screen blur is applied to the shadows.BooleanEnabled
Fullscreen Blur StrengthSets the strength of the fullscreen shadow blur.0 - 0.950.67
Fullscreen Blur SharpnessSets the sharpness of the fullscreen shadow blur around edges.0 - 40050

### Global Illumination properties

PropertyDescriptionValuesDefault
Affects GIIf enabled, this light affects diffuse global illumination.BooleanEnabled
FactorMultiplies this light’s contribution to diffuse global illumination.0.0 - 2.01.0