class render::LightProbeVolume

Inherits: RenderProxy

Render thread counterpart of LightProbeVolume.

Public

Methods

~LightProbeVolume

~LightProbeVolume() noexcept

SetRendererId

void SetRendererId(u32 id)

Sets an ID that can be used for uniquely identifying this object by the renderer.

GetRendererId

u32 GetRendererId() const

Retrieves an ID that can be used for uniquely identifying this object by the renderer.

GetWorldTransform

const Transform &GetWorldTransform() const

Returns the world space transform for the volume.

GetActiveProbeCount

u32 GetActiveProbeCount() const

Returns the number of light probes that are active.

GetLightProbePositions

const Vector<Vector3> &GetLightProbePositions() const

Returns a list of positions for all light probes.

Only the first getNumActiveProbes() entries are active.

GetLightProbeInfos

const Vector<LightProbeInfo> &GetLightProbeInfos() const

Returns non-positional information about all light probes.

Only the first getNumActiveProbes() entries are active.

GetProbeCoefficients

void GetProbeCoefficients(Vector<LightProbeCoefficientInfo> &output) const

Populates the vector with SH coefficients for each light probe.

Involves reading the GPU buffer.

GetCoefficientsTexture

SPtr<Texture> GetCoefficientsTexture() const

Returns the texture containing SH coefficients for all probes in the volume.

Protected

Constructors

LightProbeVolume

LightProbeVolume(const SPtr<SceneInstance> &scene, const UnorderedMap<u32, LightProbeVolume::ProbeInfo> &probes)

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.

RenderProbes

bool RenderProbes(GpuCommandBuffer &commandBuffer, u32 maxProbeCount)

Renders dirty probes and updates their SH coefficients in the local GPU buffer.

commandBuffer
Command buffer to encode the operations on.
maxProbeCount
Maximum number of probes to render. Set to zero to render all dirty probes. Limiting the number of probes allows the rendering to be distributed over multiple frames.

Returns: True if there are no more dirty probes to process.

ResizeCoefficientTexture

void ResizeCoefficientTexture(u32 count)

Resizes the internal texture that stores light probe SH coefficients, to the specified size (in the number of probes).

Fields

mRendererId

u32 mRendererId

mProbeMap

UnorderedMap<u32, u32> mProbeMap

mFirstDirtyProbe

u32 mFirstDirtyProbe

mProbePositions

Vector<Vector3> mProbePositions

mProbeInfos

Vector<LightProbeInfo> mProbeInfos

mCoefficients

SPtr<Texture> mCoefficients

mCoeffBufferSize

u32 mCoeffBufferSize

mInitCoefficients

Vector<LightProbeSHCoefficients> mInitCoefficients

mTransform

Transform mTransform

mActive

bool mActive

mSceneInstance

SPtr<SceneInstance> mSceneInstance