18 #ifndef INCLUDED_SHADOWMAP 19 #define INCLUDED_SHADOWMAP 140 #endif // INCLUDED_SHADOWMAP int GetDepthTextureBits() const
GetDepthTextureBits: Return the number of bits to use for depth textures when enabled.
Definition: ShadowMap.cpp:689
void SetDepthTextureBits(int bits)
SetDepthTextureBits: Sets the number of bits to use for depth textures when enabled.
Definition: ShadowMap.cpp:694
void SetupFrame(const CCamera &camera, const CVector3D &lightdir)
SetupFrame: Configure light space for the given camera and light direction, create the shadow texture...
Definition: ShadowMap.cpp:231
Struct ShadowMapInternals: Internal data for the ShadowMap implementation.
Definition: ShadowMap.cpp:58
Definition: Vector3D.h:30
void AddShadowCasterBound(const int cascade, const CBoundingBoxAligned &bounds)
Add the bounding box of an object that will cast a shadow.
Definition: ShadowMap.cpp:328
Class ShadowMap: Maintain the shadow map texture and perform necessary OpenGL setup, including matrix calculations.
Definition: ShadowMap.h:38
void AddShadowReceiverBound(const CBoundingBoxAligned &bounds)
Add the bounding box of an object that will receive a shadow.
Definition: ShadowMap.cpp:336
void BindTo(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, Renderer::Backend::IShaderProgram *shader) const
Binds all needed resources and uniforms to draw shadows using the shader.
Definition: ShadowMap.cpp:644
int GetCascadeCount() const
Returns the current number of used cascades.
Definition: ShadowMap.cpp:737
IShaderProgram is a container for multiple shaders of different types.
Definition: IShaderProgram.h:80
T bits(T num, size_t lo_idx, size_t hi_idx)
extract the value of bits hi_idx:lo_idx within num
Definition: bits.h:97
void RenderDebugBounds()
Visualize shadow mapping calculations to help in debugging and optimal shadow map usage...
Definition: ShadowMap.cpp:705
Definition: BoundingBoxAligned.h:33
~ShadowMap()
Definition: ShadowMap.cpp:208
void RecreateTexture()
RecreateTexture: Destroy the current shadow texture and force creation of a new one.
Definition: ShadowMap.cpp:219
void PrepareCamera(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const int cascade)
Sets the renderer camera for the cascade.
Definition: ShadowMap.cpp:610
void EndRender(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Finishes rendering into the shadow map.
Definition: ShadowMap.cpp:634
CFrustum GetShadowCasterCullFrustum(const int cascade)
Compute the frustum originating at the light source, that encompasses all the objects passed into Add...
Definition: ShadowMap.cpp:344
ShadowMapInternals * m
Definition: ShadowMap.h:137
Definition: IDeviceCommandContext.h:40
ShadowMap()
Definition: ShadowMap.cpp:186
void BeginRender(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Sets backend state for rendering into the shadow map texture.
Definition: ShadowMap.cpp:601