class render::Skybox

Inherits: TSkybox<true>

Render thread counterpart of a Skybox

Public

Methods

~Skybox

~Skybox() noexcept

GetFilteredRadiance

SPtr<Texture> GetFilteredRadiance() const

Returns a texture containing filtered version of the radiance texture used for reflections.

This might not be available if it hasn't been generated yet.

GetIrradiance

SPtr<Texture> GetIrradiance() const

Returns a texture containing sky irradiance.

This might not be available if it hasn't been generated yet.

~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(const SPtr<SceneInstance> &scene, const SPtr<Texture> &radiance, const SPtr<Texture> &filteredRadiance, const SPtr<Texture> &irradiance)

Methods

Initialize

void Initialize() override

Called on the render thread when the object is first created.

SyncFromCoreObject

void SyncFromCoreObject(const CoreSyncData &data, FrameAllocator &allocator) override

Update internal data from provided memory buffer that was populated with data from the owning CoreObject.

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

mActive

bool mActive

mSceneInstance

SPtr<SceneInstance> mSceneInstance

mTexture

TextureType mTexture

mBrightness

float mBrightness

Multiplier to apply to evaluated skybox values before using them.