Plasma Engine  2.0
Loading...
Searching...
No Matches
ReflectionPool.h
1#pragma once
2
3#include <Core/Graphics/AmbientCubeBasis.h>
4#include <RendererCore/Declarations.h>
5#include <RendererCore/Pipeline/Declarations.h>
6
9class plView;
10class plWorld;
11class plComponent;
20
21class PL_RENDERERCORE_DLL plReflectionPool
22{
23public:
24 //Probes
25 static plReflectionProbeId RegisterReflectionProbe(const plWorld* pWorld, const plReflectionProbeDesc& desc, const plReflectionProbeComponentBase* pComponent);
26 static void DeregisterReflectionProbe(const plWorld* pWorld, plReflectionProbeId id);
27 static void UpdateReflectionProbe(const plWorld* pWorld, plReflectionProbeId id, const plReflectionProbeDesc& desc, const plReflectionProbeComponentBase* pComponent);
28 static void ExtractReflectionProbe(const plComponent* pComponent, plMsgExtractRenderData& ref_msg, plReflectionProbeRenderData* pRenderData, const plWorld* pWorld, plReflectionProbeId id, float fPriority);
29
30 // SkyLight
31 static plReflectionProbeId RegisterSkyLight(const plWorld* pWorld, plReflectionProbeDesc& ref_desc, const plSkyLightComponent* pComponent);
32 static void DeregisterSkyLight(const plWorld* pWorld, plReflectionProbeId id);
33 static void UpdateSkyLight(const plWorld* pWorld, plReflectionProbeId id, const plReflectionProbeDesc& desc, const plSkyLightComponent* pComponent);
34
35
36 static void SetConstantSkyIrradiance(const plWorld* pWorld, const plAmbientCube<plColor>& skyIrradiance);
37 static void ResetConstantSkyIrradiance(const plWorld* pWorld);
38
39 static plUInt32 GetReflectionCubeMapSize();
40 static plGALTextureHandle GetReflectionSpecularTexture(plUInt32 uiWorldIndex, plEnum<plCameraUsageHint> cameraUsageHint);
41 static plGALTextureHandle GetSkyIrradianceTexture();
42
43private:
44 PL_MAKE_SUBSYSTEM_STARTUP_FRIEND(RendererCore, ReflectionPool);
45
46 static void OnEngineStartup();
47 static void OnEngineShutdown();
48
49 static void OnExtractionEvent(const plRenderWorldExtractionEvent& e);
50 static void OnRenderEvent(const plRenderWorldRenderEvent& e);
51
52 struct Data;
53 static Data* s_pData;
54};
Base class of all component types.
Definition Component.h:25
Definition RendererFoundationDLL.h:418
Definition RendererFoundationDLL.h:411
Definition ReflectionPool.h:22
Base class for all reflection probes.
Definition ReflectionProbeComponentBase.h:13
Render data for a reflection probe.
Definition ReflectionProbeData.h:54
Definition SkyLightComponent.h:15
Encapsulates a view on the given world through the given camera and rendered with the specified Rende...
Definition View.h:21
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
Definition AmbientCubeBasis.h:27
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Definition RenderData.h:116
plReflectionPool::Data
Definition ReflectionPoolData.h:29
Describes how a cube map should be generated.
Definition ReflectionProbeData.h:24
Definition RenderWorld.h:9
Definition RenderWorld.h:24