.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_DirectionalLight: DirectionalLight ================ **Inherits:** :ref:`Light` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Directional Light, such as the Sun or the Moon. Member Functions ---------------- +--------------------------+----------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_shadow_mode` **(** **)** const | +--------------------------+----------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_blend_splits_enabled` **(** **)** const | +--------------------------+----------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_blend_splits` **(** :ref:`bool` enabled **)** | +--------------------------+----------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_shadow_mode` **(** :ref:`int` mode **)** | +--------------------------+----------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- - :ref:`float` **directional_shadow_bias_split_scale** - :ref:`bool` **directional_shadow_blend_splits** - :ref:`int` **directional_shadow_mode** - :ref:`float` **directional_shadow_normal_bias** - :ref:`float` **directional_shadow_split_1** - :ref:`float` **directional_shadow_split_2** - :ref:`float` **directional_shadow_split_3** Numeric Constants ----------------- - **SHADOW_ORTHOGONAL** = **0** - **SHADOW_PARALLEL_2_SPLITS** = **1** - **SHADOW_PARALLEL_4_SPLITS** = **2** Description ----------- A DirectionalLight is a type of :ref:`Light` node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction. Member Function Description --------------------------- .. _class_DirectionalLight_get_shadow_mode: - :ref:`int` **get_shadow_mode** **(** **)** const .. _class_DirectionalLight_is_blend_splits_enabled: - :ref:`bool` **is_blend_splits_enabled** **(** **)** const .. _class_DirectionalLight_set_blend_splits: - void **set_blend_splits** **(** :ref:`bool` enabled **)** .. _class_DirectionalLight_set_shadow_mode: - void **set_shadow_mode** **(** :ref:`int` mode **)**