DirectionalLight

Directional light from a distance, as from the Sun.

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.

@GodotBaseClass
struct DirectionalLight {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
ShadowDepthRange
enum ShadowDepthRange
ShadowMode
enum ShadowMode

Functions

getShadowDepthRange
DirectionalLight.ShadowDepthRange getShadowDepthRange()
getShadowMode
DirectionalLight.ShadowMode getShadowMode()
isBlendSplitsEnabled
bool isBlendSplitsEnabled()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(DirectionalLight other)
opEquals
bool opEquals(typeof(null) n)
setBlendSplits
void setBlendSplits(bool enabled)
setShadowDepthRange
void setShadowDepthRange(long mode)
setShadowMode
void setShadowMode(long mode)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

directionalShadowBiasSplitScale
double directionalShadowBiasSplitScale [@property getter]
double directionalShadowBiasSplitScale [@property setter]

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.

directionalShadowBlendSplits
bool directionalShadowBlendSplits [@property getter]
bool directionalShadowBlendSplits [@property setter]

If true, shadow detail is sacrificed in exchange for smoother transitions between splits.

directionalShadowDepthRange
DirectionalLight.ShadowDepthRange directionalShadowDepthRange [@property getter]
long directionalShadowDepthRange [@property setter]

Optimizes shadow rendering for detail versus movement. See shadowdepthrange.

directionalShadowMaxDistance
double directionalShadowMaxDistance [@property getter]
double directionalShadowMaxDistance [@property setter]

The maximum distance for shadow splits.

directionalShadowMode
DirectionalLight.ShadowMode directionalShadowMode [@property getter]
long directionalShadowMode [@property setter]

The light's shadow rendering algorithm. See shadowmode.

directionalShadowNormalBias
double directionalShadowNormalBias [@property getter]
double directionalShadowNormalBias [@property setter]

Can be used to fix special cases of self shadowing when objects are perpendicular to the light.

directionalShadowSplit1
double directionalShadowSplit1 [@property getter]
double directionalShadowSplit1 [@property setter]

The distance from camera to shadow split 1. Relative to directionalShadowMaxDistance. Only used when directionalShadowMode is SHADOW_PARALLEL_2_SPLITS or SHADOW_PARALLEL_4_SPLITS.

directionalShadowSplit2
double directionalShadowSplit2 [@property getter]
double directionalShadowSplit2 [@property setter]

The distance from shadow split 1 to split 2. Relative to directionalShadowMaxDistance. Only used when directionalShadowMode is SHADOW_PARALLEL_2_SPLITS or SHADOW_PARALLEL_4_SPLITS.

directionalShadowSplit3
double directionalShadowSplit3 [@property getter]
double directionalShadowSplit3 [@property setter]

The distance from shadow split 2 to split 3. Relative to directionalShadowMaxDistance. Only used when directionalShadowMode is SHADOW_PARALLEL_4_SPLITS.

Static functions

_new
DirectionalLight _new()

Construct a new instance of DirectionalLight. Note: use memnew!DirectionalLight instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta