Plasma Engine  2.0
Loading...
Searching...
No Matches
plReflectionProbeUpdater Class Reference

Renders reflection probes and stores filtered mipmap chains into an atlas texture as well as computing sky irradiance Rendering sky irradiance is optional and only done if m_iIrradianceOutputIndex != -1. More...

#include <ReflectionProbeUpdater.h>

Classes

struct  TargetSlot
 Defines the target specular reflection probe atlas and index as well as the sky irradiance atlas and index in case the rendered cube map is a sky light. More...
 

Public Member Functions

 plReflectionProbeUpdater ()
 plReflectionProbeUpdater
 
plUInt32 GetFreeUpdateSlots (plDynamicArray< plReflectionProbeRef > &out_updatesFinished)
 Returns how many new probes can be started this frame.
 
plResult StartDynamicUpdate (const plReflectionProbeRef &probe, const plReflectionProbeDesc &desc, const plTransform &globalTransform, const TargetSlot &target)
 Starts rendering a new reflection probe.
 
plResult StartFilterUpdate (const plReflectionProbeRef &probe, const plReflectionProbeDesc &desc, plTextureCubeResourceHandle hSourceTexture, const TargetSlot &target)
 Starts filtering an existing cube map into a new reflection probe.
 
void CancelUpdate (const plReflectionProbeRef &probe)
 Cancel a previously started update.
 
void GenerateUpdateSteps ()
 Generates update steps. Should be called in PreExtraction phase.
 
void ScheduleUpdateSteps ()
 Schedules probe rendering views. Should be called at some point during the extraction phase. Can be called multiple times. It will only do work on the first call after GenerateUpdateSteps.
 

Detailed Description

Renders reflection probes and stores filtered mipmap chains into an atlas texture as well as computing sky irradiance Rendering sky irradiance is optional and only done if m_iIrradianceOutputIndex != -1.

Member Function Documentation

◆ GetFreeUpdateSlots()

plUInt32 plReflectionProbeUpdater::GetFreeUpdateSlots ( plDynamicArray< plReflectionProbeRef > & out_updatesFinished)

Returns how many new probes can be started this frame.

Parameters
out_updatesFinishedContains the probes that finished last frame.
Returns
The number of new probes can be started this frame.

◆ StartDynamicUpdate()

plResult plReflectionProbeUpdater::StartDynamicUpdate ( const plReflectionProbeRef & probe,
const plReflectionProbeDesc & desc,
const plTransform & globalTransform,
const TargetSlot & target )

Starts rendering a new reflection probe.

Parameters
probeThe world and probe index to be rendered. Used as an identifier.
descProbe render settings.
globalTransformWorld position to be rendered.
targetWhere the probe should be rendered into.
Returns
Returns PL_FAILURE if no more free slots are available.

◆ StartFilterUpdate()

plResult plReflectionProbeUpdater::StartFilterUpdate ( const plReflectionProbeRef & probe,
const plReflectionProbeDesc & desc,
plTextureCubeResourceHandle hSourceTexture,
const TargetSlot & target )

Starts filtering an existing cube map into a new reflection probe.

Parameters
probeThe world and probe index to be rendered. Used as an identifier.
descProbe render settings.
sourceTextureCube map that should be filtered into a reflection probe.
targetWhere the probe should be rendered into.
Returns
Returns PL_FAILURE if no more free slots are available.

The documentation for this class was generated from the following files: