Class DirectionalLight
Directional light emits light from direction in space.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Level/Actors/DirectionalLight.h
Syntax
public class DirectionalLight : public LightWithShadow
Fields
Cascade1Spacing
Percentage of the shadow distance used by the first cascade.
Declaration
public float Cascade1Spacing = 0.05f
Field Value
float
|
Cascade2Spacing
Percentage of the shadow distance used by the second cascade.
Declaration
public float Cascade2Spacing = 0.15f
Field Value
float
|
Cascade3Spacing
Percentage of the shadow distance used by the third cascade.
Declaration
public float Cascade3Spacing = 0.50f
Field Value
float
|
Cascade4Spacing
Percentage of the shadow distance used by the fourth cascade.
Declaration
public float Cascade4Spacing = 1.0f
Field Value
float
|
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
public int32 CascadeCount = 4
Field Value
int32
|
PartitionMode
The partitioning mode for the shadow cascades.
Declaration
public PartitionMode PartitionMode = PartitionMode::Manual
Field Value
PartitionMode
|
Methods
Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
Deserializes object from the input stream.
Declaration
public virtual void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
Parameters
DeserializeStream
stream
The input stream. |
ISerializeModifier
modifier
The deserialization modifier object. Always valid. |
Overrides
Draw(RenderContext& renderContext)
Draws this actor. Called by Scene Rendering service. This call is more optimized than generic Draw (eg. geometry is rendered during all pass types but other actors are drawn only during GBufferFill pass).
Declaration
public virtual void Draw(RenderContext& renderContext) override
Parameters
RenderContext
renderContext
The rendering context. |
Overrides
IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)
Determines if there is an intersection between the current object and a ray.
Declaration
public virtual bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override
Parameters
Ray
ray
The ray to test. |
Real
distance
When the method completes, contains the distance of the intersection (if any valid). |
Vector3
normal
When the method completes, contains the intersection surface normal vector (if any valid). |
Returns
bool
True whether the two objects intersected, otherwise false. |
Overrides
OnTransformChanged()
Called when actor transform gets changed.
Declaration
protected virtual void OnTransformChanged() override
Overrides
Serialize(SerializeStream& stream, const void* otherObj)
Serializes object to the output stream compared to the values of the other object instance (eg. default class object). If other object is null then serialize all properties.
Declaration
public virtual void Serialize(SerializeStream& stream, const void* otherObj) override
Parameters
SerializeStream
stream
The output stream. |
void
otherObj
The instance of the object to compare with and serialize only the modified properties. If null, then serialize all properties. |