Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
DirectionalLight¶
Inherits: Light < VisualInstance < CullInstance < Spatial < Node < Object
Luz direccional desde una distancia, como desde el Sol.
Descripción¶
A directional light is a type of Light 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 DirectionalLight transform (origin) is ignored. Only the basis is used to determine light direction.
Tutoriales¶
Propiedades¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
shadow_bias |
|
Enumeraciones¶
enum ShadowMode:
SHADOW_ORTHOGONAL = 0 --- Renderiza el mapa de sombras de toda la escena desde un punto de vista ortogonal. Este es el modo de sombra de dirección más rápida. Puede dar lugar a sombras más borrosas en objetos cercanos.
SHADOW_PARALLEL_2_SPLITS = 1 --- Divide la vista del frustum en 2 áreas, cada una con su propio mapa de sombras. Este modo de sombra es un compromiso entre SHADOW_ORTHOGONAL y SHADOW_PARALLEL_4_SPLITS en términos de rendimiento.
SHADOW_PARALLEL_4_SPLITS = 2 --- Divide el frustum de la vista en 4 áreas, cada una con su propio mapa de sombras. Este es el modo de sombra direccional más lento.
enum ShadowDepthRange:
SHADOW_DEPTH_RANGE_STABLE = 0 --- Mantiene la sombra estable cuando la cámara se mueve, a costa de una menor resolución efectiva de la sombra.
SHADOW_DEPTH_RANGE_OPTIMIZED = 1 --- Intenta conseguir la máxima resolución de las sombras. Puede resultar en un efecto de sierra en los bordes de la sombra. Este modo suele funcionar mejor en juegos en los que la cámara suele moverse a altas velocidades, como la mayoría de los juegos de carreras.
Descripciones de Propiedades¶
float directional_shadow_bias_split_scale
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Amount of extra bias for shadow splits that are far away. If self-shadowing occurs only on the splits far away, increasing this value can fix them.
bool directional_shadow_blend_splits
Default |
|
Setter |
set_blend_splits(value) |
Getter |
is_blend_splits_enabled() |
Si true
, el detalle de la sombra se sacrifica a cambio de transiciones más suaves entre las divisiones.
ShadowDepthRange directional_shadow_depth_range
Default |
|
Setter |
set_shadow_depth_range(value) |
Getter |
get_shadow_depth_range() |
Optimiza la representación de las sombras para los detalles frente al movimiento. Ver ShadowDepthRange.
float directional_shadow_max_distance
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
La distancia máxima para las divisiones de la sombra.
ShadowMode directional_shadow_mode
Default |
|
Setter |
set_shadow_mode(value) |
Getter |
get_shadow_mode() |
El algoritmo de renderizado de las sombras de la luz. Ver ShadowMode.
float directional_shadow_normal_bias
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Can be used to fix special cases of self shadowing when objects are perpendicular to the light.
float directional_shadow_split_1
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
La distancia de la cámara a la sombra se divide en 1. Relativo a directional_shadow_max_distance. Sólo se utiliza cuando directional_shadow_mode es SHADOW_PARALLEL_2_SPLITS
o SHADOW_PARALLEL_4_SPLITS
.
float directional_shadow_split_2
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
La distancia de la sombra se divide en dos. Relativo a directional_shadow_max_distance. Sólo se utiliza cuando directional_shadow_mode es SHADOW_PARALLEL_2_SPLITS
o SHADOW_PARALLEL_4_SPLITS
.
float directional_shadow_split_3
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
La distancia de la sombra se divide en dos y tres. Relativo a directional_shadow_max_distance. Sólo se usa cuando directional_shadow_mode es SHADOW_PARALLEL_4_SPLITS
.