Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

DirectionalLight3D

Inherits: Light3D < VisualInstance3D < Node3D < Node < Object

Directional light from a distance, as from the Sun.

Description

A directional light is a type of Light3D node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight3D transform (origin) is ignored. Only the basis is used to determine light direction.

Tutorials

Properties

bool

directional_shadow_blend_splits

false

float

directional_shadow_fade_start

0.8

float

directional_shadow_max_distance

100.0

ShadowMode

directional_shadow_mode

2

float

directional_shadow_pancake_size

20.0

float

directional_shadow_split_1

0.1

float

directional_shadow_split_2

0.2

float

directional_shadow_split_3

0.5

SkyMode

sky_mode

0


Enumerations

enum ShadowMode:

ShadowMode SHADOW_ORTHOGONAL = 0

Renders the entire scen