Class Skybox
Skybox actor renders sky using custom cube texture or material.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Level/Actors/Skybox.h
Syntax
public class Skybox : public Actor, public ISkyRenderer
Fields
Color
CubeTexture
The cube texture to draw.
Declaration
public AssetReference<CubeTexture> CubeTexture
Field Value
AssetReference<CubeTexture>
|
CustomMaterial
The skybox custom material used to override default (domain set to surface).
Declaration
public AssetReference<MaterialBase> CustomMaterial
Field Value
AssetReference<MaterialBase>
|
Exposure
The skybox texture exposure value. Can be used to make skybox brighter or dimmer.
Declaration
public float Exposure = 0.0f
Field Value
float
|
PanoramicTexture
The panoramic texture to draw. It should have a resolution ratio close to 2:1.
Declaration
public AssetReference<Texture> PanoramicTexture
Field Value
AssetReference<Texture>
|
Methods
ApplySky(GPUContext* context, RenderContext& renderContext, const Matrix& world)
Apply sky material/shader state to the GPU pipeline with custom parameters set (render to GBuffer).
Declaration
public virtual void ApplySky(GPUContext* context, RenderContext& renderContext, const Matrix& world) override
Parameters
GPUContext
context
The context responsible for rendering commands. |
RenderContext
renderContext
The rendering context. |
Matrix
world
The world matrix to use during sky model vertices transformations. |
Overrides
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
GetEditorBox()
Gets actor bounding box (single actor, no children included) for editor tools.
Declaration
public virtual BoundingBox GetEditorBox() const override
Returns
BoundingBox
|
Overrides
GetIndirectLightingIntensity()
Declaration
public virtual float GetIndirectLightingIntensity() const override
Returns
float
|
Overrides
HasContentLoaded()
Returns true if actor has loaded content.
Declaration
public virtual bool HasContentLoaded() const override
Returns
bool
|
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
IsDynamicSky()
Returns true if sky is realtime, otherwise it's static.
Declaration
public virtual bool IsDynamicSky() const override
Returns
bool
|
Overrides
OnDisable()
Called when actor gets removed from game systems. Occurs on EndPlay event or when actor gets inactivated in hierarchy. Use this event to unregister object from other game system (eg. audio).
Declaration
protected virtual void OnDisable() override
Overrides
OnEnable()
Called when actor gets added to game systems. Occurs on BeginPlay event or when actor gets activated in hierarchy. Use this event to register object to other game system (eg. audio).
Declaration
protected virtual void OnEnable() 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. |