BVB Source Codes

CRYENGINE Show ShadowCache.h Source code

Return Download CRYENGINE: download ShadowCache.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef STATIC_SHADOWS_H
  4. #define STATIC_SHADOWS_H
  5.  
  6. #include <CryCore/Platform/platform.h>
  7. #include "../RenderDll/Common/Shadow_Renderer.h"
  8.  
  9. class ShadowCache : public Cry3DEngineBase
  10. {
  11. public:
  12.         ShadowCache(CLightEntity* pLightEntity, ShadowMapFrustum::ShadowCacheData::eUpdateStrategy nUpdateStrategy)
  13.                 : m_pLightEntity(pLightEntity)
  14.                 , m_nUpdateStrategy(nUpdateStrategy)
  15.         {}
  16.  
  17.         void InitShadowFrustum(ShadowMapFrustumPtr& pFr, int nLod, int nFirstStaticLod, float fDistFromViewDynamicLod, float fRadiusDynamicLod, const SRenderingPassInfo& passInfo);
  18.         void InitHeightMapAOFrustum(ShadowMapFrustumPtr& pFr, int nLod, const SRenderingPassInfo& passInfo);
  19.  
  20. private:
  21.         static const int    MAX_RENDERNODES_PER_FRAME = 50;
  22.         static const float  AO_FRUSTUM_SLOPE_BIAS;
  23.         static const uint64 kHashMul = 0x9ddfea08eb382d69ULL;
  24.  
  25.         void         InitCachedFrustum(ShadowMapFrustumPtr& pFr, ShadowMapFrustum::ShadowCacheData::eUpdateStrategy nUpdateStrategy, int nLod, int nTexSize, const Vec3& vLightPos, const AABB& projectionBoundsLS, const SRenderingPassInfo& passInfo);
  26.         void         AddTerrainCastersToFrustum(ShadowMapFrustum* pFr, const SRenderingPassInfo& passInfo);
  27.  
  28.         void         GetCasterBox(AABB& BBoxWS, AABB& BBoxLS, float fRadius, const Matrix34& matView, const SRenderingPassInfo& passInfo);
  29.         Matrix44     GetViewMatrix(const SRenderingPassInfo& passInfo);
  30.  
  31.         ILINE uint64 HashValue(uint64 value);
  32.         ILINE uint64 HashTerrainNode(const CTerrainNode* pNode, int lod);
  33.  
  34.         CLightEntity* m_pLightEntity;
  35.         ShadowMapFrustum::ShadowCacheData::eUpdateStrategy m_nUpdateStrategy;
  36. };
  37. #endif
  38.  
downloadShadowCache.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top