Class SkyLight
Sky light captures the distant parts of the scene and applies it as a light. Allows to add ambient light.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Level/Actors/SkyLight.h
Syntax
public class SkyLight : public Light
Fields
AdditiveColor
Additional color to add. Source texture colors are summed with it. Can be used to apply custom ambient color.
Declaration
public ::Color AdditiveColor = Color::Black
Field Value
::Color
|
CustomTexture
The custom texture.
Declaration
public AssetReference<CubeTexture> CustomTexture
Field Value
AssetReference<CubeTexture>
|
Mode
The current light source mode.
Declaration
public Modes Mode = Modes::CustomTexture
Field Value
Modes
|
SkyDistanceThreshold
Distance from the light at which any geometry should be treated as part of the sky.
Declaration
public float SkyDistanceThreshold = 150000.0f
Field Value
float
|
Methods
Bake(float timeout = 0)
Bakes that probe.
Declaration
public void Bake(float timeout = 0)
Parameters
float
timeout
The timeout in seconds left to bake it (aka startup time). |
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
GetRadius()
Gets the radius.
Declaration
public float GetRadius() const
Returns
float
|
GetScaledRadius()
Gets the scaled radius of the sky light.
Declaration
public float GetScaledRadius() const
Returns
float
|
GetSource()
Gets the light source texture.
Declaration
public CubeTexture* GetSource() const
Returns
CubeTexture
|
HasContentLoaded()
Returns true if actor has loaded content.
Declaration
public virtual bool HasContentLoaded() const override
Returns
bool
|
Overrides
OnDebugDrawSelected()
Draws debug shapes for the selected actor and all child scripts.
Declaration
public virtual void OnDebugDrawSelected() override
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. |
Overrides
SetProbeData(TextureData& data)
Action fired when probe has been baked.
Declaration
public void SetProbeData(TextureData& data)
Parameters
TextureData
data
The new probe data. |
SetRadius(float value)
Sets the radius.
Declaration
public void SetRadius(float value)
Parameters
float
value
|