9#include <unordered_map>
13#include "misc/Error.h"
14#include "render/general/resource/shadow/ShadowMapArrayIndexManager.h"
15#include "ShadowMapType.hpp"
19 class GpuResourceManager;
20 class ShadowMapHandle;
55 std::unordered_map<ShadowMapHandle*, ShadowMapHandleResources>
shadowMaps;
62 std::array<std::unique_ptr<ShadowMapArrayIndexManager>,
static_cast<size_t>(ShadowMapType::SIZE)>
134 static std::variant<std::unique_ptr<ShadowMapManager>,
Error>
152 const std::string& sResourceName,
154 const std::function<
void(
unsigned int)>& onArrayIndexChanged);
183 std::array<std::unique_ptr<ShadowMapArrayIndexManager>,
static_cast<size_t>(ShadowMapType::SIZE)>
184 vShadowMapArrayIndexManagers);
Definition: GpuResourceManager.h:43
Definition: PipelineManager.h:54
Definition: Pipeline.h:20
Definition: Renderer.h:43
Definition: ShadowMapArrayIndexManager.h:25
Definition: ShadowMapHandle.h:23
Definition: ShadowMapManager.h:29
static constexpr auto pSpotShadowMapsShaderResourceName
Definition: ShadowMapManager.h:265
static constexpr auto pPointShadowMapsShaderResourceName
Definition: ShadowMapManager.h:268
Renderer * getRenderer() const
Definition: ShadowMapManager.cpp:125
std::pair< std::recursive_mutex, InternalResources > * getInternalResources()
Definition: ShadowMapManager.h:163
unsigned int correctShadowMapResolutionForType(unsigned int iRenderSettingsShadowMapSize, ShadowMapType type)
Definition: ShadowMapManager.cpp:258
void onShadowMapHandleBeingDestroyed(ShadowMapHandle *pHandleToResourceDestroy)
Definition: ShadowMapManager.cpp:142
static constexpr float visibleDistanceToNearClipPlaneRatio
Definition: ShadowMapManager.h:259
static constexpr const char * getSpotShadowMapsShaderResourceName()
Definition: ShadowMapManager.h:104
static constexpr const char * getPointShadowMapsShaderResourceName()
Definition: ShadowMapManager.h:113
static float getShadowPassDepthSlopeFactor()
Definition: ShadowMapManager.cpp:317
static constexpr auto pDirectionalShadowMapsShaderResourceName
Definition: ShadowMapManager.h:262
static int getShadowPassDepthBias()
Definition: ShadowMapManager.cpp:313
ShadowMapArrayIndexManager * getArrayIndexManagerBasedOnShadowMapType(ShadowMapType type)
Definition: ShadowMapManager.cpp:128
static constexpr float getVisibleDistanceToNearClipPlaneRatio()
Definition: ShadowMapManager.h:123
std::optional< Error > bindShadowMapsToAllPipelines()
Definition: ShadowMapManager.cpp:39
std::optional< Error > recreateShadowMaps()
Definition: ShadowMapManager.cpp:178
std::variant< std::unique_ptr< ShadowMapHandle >, Error > createShadowMap(const std::string &sResourceName, ShadowMapType type, const std::function< void(unsigned int)> &onArrayIndexChanged)
Definition: ShadowMapManager.cpp:54
GpuResourceManager * pResourceManager
Definition: ShadowMapManager.h:256
std::optional< Error > bindShadowMapsToPipeline(Pipeline *pPipeline)
Definition: ShadowMapManager.cpp:24
static constexpr const char * getDirectionalShadowMapsShaderResourceName()
Definition: ShadowMapManager.h:95
std::pair< std::recursive_mutex, InternalResources > mtxInternalResources
Definition: ShadowMapManager.h:253
~ShadowMapManager()
Definition: ShadowMapManager.cpp:280
static std::variant< std::unique_ptr< ShadowMapManager >, Error > create(GpuResourceManager *pResourceManager)
Definition: ShadowMapManager.cpp:322
Definition: ShadowMapManager.h:53
std::array< std::unique_ptr< ShadowMapArrayIndexManager >, static_cast< size_t >(ShadowMapType::SIZE)> vShadowMapArrayIndexManagers
Definition: ShadowMapManager.h:63
std::unordered_map< ShadowMapHandle *, ShadowMapHandleResources > shadowMaps
Definition: ShadowMapManager.h:55
Definition: ShadowMapManager.h:41
std::unique_ptr< GpuResource > pDepthTexture
Definition: ShadowMapManager.h:43
std::unique_ptr< GpuResource > pColorTexture
Definition: ShadowMapManager.h:49