class Skybox

Allows you to specify an environment map to use for sampling radiance of the sky.

Public

Constructors

Skybox

Skybox(const HSceneObject &parent)

Methods

SetTexture

void SetTexture(const HTexture &texture)

Determines an environment map to use for sampling skybox radiance.

Must be a cube-map texture, and should ideally contain HDR data.

staticGetRttiStatic

static RTTIType *GetRttiStatic()

GetRtti

RTTIType *GetRtti() const override

Returns an interface you can use to access class' Run Time Type Information.

~TSkybox<IsRenderProxy>

virtual ~TSkybox<IsRenderProxy>() = default

SetBrightness

void SetBrightness(float brightness)

Brightness multiplier that will be applied to skybox values before they're being used.

Allows you to make the skybox more or less bright. Equal to one by default.

GetBrightness

float GetBrightness() const

GetTexture

TextureType GetTexture() const

Determines an environment map to use for sampling skybox radiance.

Must be a cube-map texture, and should ideally contain HDR data.

Protected

Constructors

Skybox

Skybox()

Methods

FilterTexture

void FilterTexture()

Filters the skybox radiance texture, generating filtered radiance (for reflections) and irradiance.

Should be called any time the skybox texture changes.

CreateRenderProxy

SPtr<render::RenderProxy> CreateRenderProxy() const override

Creates an object that contains render thread specific data and methods for this object.

Can be null if such object is not required.

CreateRenderProxySyncPacket

RenderProxySyncPacket *CreateRenderProxySyncPacket(FrameAllocator &allocator, u32 flags) override

Creates a data packet that will be used for syncing the core object with it's render proxy.

Caller must free the retrieved packet using the provided allocator when done using it.

Initialize

void Initialize() override

Construct any resources the component needs before use.

Called when the parent scene object is initialized. A non-initialized component shouldn't be used in a live scene (i.e. it should not receive any of the component logic updates or events).

OnCreated

void OnCreated() override

Called once when the component has been created.

Called regardless of the state the component is in.

OnEnabled

void OnEnabled() override

Called every time a component leaves the Stopped state, if the component is enabled.

This includes component creation if requirements for leaving the Stopped state are met. When called during creation it is called after OnBeginPlay.

OnDisabled

void OnDisabled() override

Called every time a component is placed into the Stopped state.

This includes component destruction if component wasn't already in Stopped state during destruction. When called during destruction it is called before OnDestroyed.

OnDestroyed

void OnDestroyed() override

Called once just before the component is destroyed.

Called regardless of the state the component is in.

MarkRenderProxyDataDirty

void MarkRenderProxyDataDirty(ComponentDirtyFlag flag = ComponentDirtyFlag::Everything)

Marks the render proxy data as dirty.

This causes the SyncToRenderProxy() method to trigger the next time objects are synced to the render thread.

flags
Flags in case you want to signal that only part of the internal data is dirty. SyncToRenderProxy() will be called regardless and it's up to the implementation to read the flags value if needed.

Fields

mFilteredRadiance

SPtr<Texture> mFilteredRadiance

mIrradiance

SPtr<Texture> mIrradiance

mRendererTask

SPtr<render::RendererTask> mRendererTask

mTexture

TextureType mTexture

mBrightness

float mBrightness

Multiplier to apply to evaluated skybox values before using them.