class ReflectionProbeObjectStorageBase

Contains render thread representation of reflection probe objects, stored in packed arrays accessible by PackedRendererId.

Implements main -> render thread synchronization logic for reflection probe objects.

Public

Methods

SyncRead

void *SyncRead(ecs::Registry &registry, FrameAllocator &allocator) override

Scans the provided registry for dirty objects, generates the update packets and stores them into a batch buffer allocated by .

Returns pointer to the batch buffer memory.

SyncWrite

void SyncWrite(void *batchData, FrameAllocator &allocator) override

Applies data from a batch buffer generated by SyncRead to objects on the render thread, and frees the frame-allocated batch data via .

GetReflectionProbeProxy

render::ReflectionProbeProxy &GetReflectionProbeProxy(PackedRendererId slotId)

Returns the reflection probe proxy at the given slot.

GetReflectionProbeProxy

const render::ReflectionProbeProxy &GetReflectionProbeProxy(PackedRendererId slotId) const

Returns the reflection probe proxy at the given slot (const).

GetReflectionProbeCount

u32 GetReflectionProbeCount() const

Returns the total number of reflection probes.

UpdateFilteredTexture

void UpdateFilteredTexture(RendererId probeId, const SPtr<render::Texture> &texture)

Updates the filtered texture for a reflection probe identified by persistent RendererId.

Resolves the ID to a packed ID (with version check for safety), updates the proxy's filtered texture, and calls OnFilteredTextureUpdated so the renderer can mark the cubemap array slot dirty.

CreateRenderState

virtual void CreateRenderState(TArrayView<const PackedRendererId> slotIds) = 0

Called once per frame for each new reflection probe being added, or a probe whose data needs to be rebuilt after a significant update (in which case DestroyRenderState will be called first).

DestroyRenderState

virtual void DestroyRenderState(TArrayView<const PackedRendererId> slotIds) = 0

Called once per frame for each reflection probe that is being removed, or a probe that needs to be rebuilt after a significant update (in which case CreateRenderState will be called right after).

UpdateRenderState

virtual void UpdateRenderState(TArrayView<const PackedRendererId> slotIds) = 0

Called once per frame for each reflection probe that needs to be updated after a minor update (e.g. one that doesn't require a full render state rebuild, such as a transform change).

OnFilteredTextureUpdated

virtual void OnFilteredTextureUpdated(PackedRendererId slotId)

Called when a reflection probe's filtered texture has been updated.

Override to mark cubemap array slot dirty.

Protected

Fields

mReflectionProbeProxies