3#include <RendererCore/RendererCorePCH.h>
5#include <Core/Graphics/Camera.h>
6#include <RendererCore/Lights/Implementation/ReflectionProbeData.h>
7#include <RendererCore/Pipeline/Declarations.h>
8#include <RendererFoundation/RendererFoundationDLL.h>
10PL_DECLARE_FLAGS(plUInt8, plReflectionProbeUpdaterFlags, SkyLight, HasCustomCubeMap);
69 using StorageType = plUInt8;
86 static bool IsRenderStep(Enum value) {
return value >= UpdateStep::RenderFace0 && value <= UpdateStep::RenderFace5; }
87 static Enum NextStep(Enum value) {
return static_cast<UpdateStep::Enum
>((value + 1) % UpdateStep::ENUM_COUNT); }
90 struct ProbeUpdateInfo
100 TargetSlot m_TargetSlot;
104 PL_DECLARE_POD_TYPE();
106 plUInt8 m_uiViewIndex;
110 bool m_bInUse =
false;
120 static void CreateViews(
122 void CreateReflectionViewsAndResources();
124 void ResetProbeUpdateInfo(plUInt32 uiInfo);
127 bool m_bUpdateStepsFlushed =
true;
A camera class that stores the orientation and some basic camera settings.
Definition Camera.h:41
Definition DynamicArray.h:81
Definition RendererFoundationDLL.h:411
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Renders reflection probes and stores filtered mipmap chains into an atlas texture as well as computin...
Definition ReflectionProbeUpdater.h:15
void GenerateUpdateSteps()
Generates update steps. Should be called in PreExtraction phase.
Definition ReflectionProbeUpdater.cpp:162
plUInt32 GetFreeUpdateSlots(plDynamicArray< plReflectionProbeRef > &out_updatesFinished)
Returns how many new probes can be started this frame.
Definition ReflectionProbeUpdater.cpp:88
plResult StartDynamicUpdate(const plReflectionProbeRef &probe, const plReflectionProbeDesc &desc, const plTransform &globalTransform, const TargetSlot &target)
Starts rendering a new reflection probe.
Definition ReflectionProbeUpdater.cpp:101
void CancelUpdate(const plReflectionProbeRef &probe)
Cancel a previously started update.
Definition ReflectionProbeUpdater.cpp:149
plReflectionProbeUpdater()
plReflectionProbeUpdater
plResult StartFilterUpdate(const plReflectionProbeRef &probe, const plReflectionProbeDesc &desc, plTextureCubeResourceHandle hSourceTexture, const TargetSlot &target)
Starts filtering an existing cube map into a new reflection probe.
Definition ReflectionProbeUpdater.cpp:124
void ScheduleUpdateSteps()
Schedules probe rendering views. Should be called at some point during the extraction phase....
Definition ReflectionProbeUpdater.cpp:225
Definition Declarations.h:64
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Describes how a cube map should be generated.
Definition ReflectionProbeData.h:24
A unique reference to a reflection probe.
Definition ReflectionProbeData.h:76
Definition ReflectionProbeUpdater.h:103
Defines the target specular reflection probe atlas and index as well as the sky irradiance atlas and ...
Definition ReflectionProbeUpdater.h:19
plInt32 m_iIrradianceOutputIndex
If -1, no irradiance is computed.
Definition ReflectionProbeUpdater.h:23
plGALTextureHandle m_hSpecularOutputTexture
Must be a valid cube map texture array handle.
Definition ReflectionProbeUpdater.h:20
plInt32 m_iSpecularOutputIndex
Must be a valid index into the atlas texture.
Definition ReflectionProbeUpdater.h:22
plGALTextureHandle m_hIrradianceOutputTexture
Optional. Must be set if m_iIrradianceOutputIndex != -1.
Definition ReflectionProbeUpdater.h:21
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54