Class DirectionalLight
Directional light emits light from direction in space.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[ActorContextMenu("New/Lights/Directional Light")]
[ActorToolbox("Lights")]
[Unmanaged]
public class DirectionalLight : LightWithShadow, ISerializable
Constructors
DirectionalLight()
Properties
Cascade1Spacing
Percentage of the shadow distance used by the first cascade.
Declaration
[EditorOrder(66)]
[VisibleIf("ShowCascade1", false)]
[Limit(0F, 1F, 0.001F)]
[EditorDisplay("Shadow", null)]
[Unmanaged]
public float Cascade1Spacing { get; set; }
Property Value
|
System.Single
|
Cascade2Spacing
Percentage of the shadow distance used by the second cascade.
Declaration
[EditorOrder(67)]
[VisibleIf("ShowCascade2", false)]
[Limit(0F, 1F, 0.001F)]
[EditorDisplay("Shadow", null)]
[Unmanaged]
public float Cascade2Spacing { get; set; }
Property Value
|
System.Single
|
Cascade3Spacing
Percentage of the shadow distance used by the third cascade.
Declaration
[EditorOrder(68)]
[VisibleIf("ShowCascade3", false)]
[Limit(0F, 1F, 0.001F)]
[EditorDisplay("Shadow", null)]
[Unmanaged]
public float Cascade3Spacing { get; set; }
Property Value
|
System.Single
|
Cascade4Spacing
Percentage of the shadow distance used by the fourth cascade.
Declaration
[EditorOrder(69)]
[VisibleIf("ShowCascade4", false)]
[Limit(0F, 1F, 0.001F)]
[EditorDisplay("Shadow", null)]
[Unmanaged]
public float Cascade4Spacing { get; set; }
Property Value
|
System.Single
|
CascadeBlendSize
Percentage of the cascade distance over which cascades will blend together. This helps to hide the transition between cascades.
Declaration
[EditorOrder(70)]
[EditorDisplay("Shadow", "Cascade Blend Distance")]
[Limit(0F, 1F, 1F)]
[Unmanaged]
public float CascadeBlendSize { get; set; }
Property Value
|
System.Single
|
CascadeCount
The number of cascades used for slicing the range of depth covered by the light during shadow rendering. Values are 1, 2 or 4 cascades; a typical scene uses 4 cascades.
Declaration
[EditorOrder(65)]
[Limit(1F, 4F, 1F)]
[EditorDisplay("Shadow", null)]
[Unmanaged]
public int CascadeCount { get; set; }
Property Value
|
System.Int32
|
PartitionMode
The partitioning mode for the shadow cascades.
Declaration
[EditorOrder(64)]
[EditorDisplay("Shadow", null)]
[Unmanaged]
public PartitionMode PartitionMode { get; set; }
Property Value
|
PartitionMode
|
SourceAngle
Light source angle (in degrees) that defines its angular diameter. Higher values produce softer shadows. The default value is 0.5357 degrees, which is the angular diameter of the Sun as seen from Earth. Set this to 0 to produce hard shadows with sharp edges.
Declaration
[EditorOrder(41)]
[EditorDisplay("Light", null)]
[Limit(0F, 4F, 0.001F)]
[ValueCategory]
[Unmanaged]
public float SourceAngle { get; set; }
Property Value
|
System.Single
|