18#ifndef INCLUDED_SHADOWMAP
19#define INCLUDED_SHADOWMAP
Definition: BoundingBoxAligned.h:35
Definition: Vector3D.h:32
Definition: IDeviceCommandContext.h:46
IShaderProgram is a container for multiple shaders of different types.
Definition: IShaderProgram.h:85
Class ShadowMap: Maintain the shadow map texture and perform necessary OpenGL setup,...
Definition: ShadowMap.h:38
void EndRender(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Finishes rendering into the shadow map.
Definition: ShadowMap.cpp:656
void CreateViewSizeDependentObjects(const uint32_t width, const uint32_t height)
Definition: ShadowMap.cpp:230
ShadowMap(Renderer::Backend::IDevice *device)
Definition: ShadowMap.cpp:198
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:251
void AddShadowReceiverBound(const CBoundingBoxAligned &bounds)
Add the bounding box of an object that will receive a shadow.
Definition: ShadowMap.cpp:353
void AddShadowCasterBound(const int cascade, const CBoundingBoxAligned &bounds)
Add the bounding box of an object that will cast a shadow.
Definition: ShadowMap.cpp:345
void DestroyViewSizeDependentObjects()
Definition: ShadowMap.cpp:237
CFrustum GetShadowCasterCullFrustum(const int cascade)
Compute the frustum originating at the light source, that encompasses all the objects passed into Add...
Definition: ShadowMap.cpp:361
~ShadowMap()
Definition: ShadowMap.cpp:221
void BeginRender(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Sets backend state for rendering into the shadow map texture.
Definition: ShadowMap.cpp:622
void RenderDebugBounds(Renderer::Backend::IDeviceCommandContext &deviceCommandContext)
Visualize shadow mapping calculations to help in debugging and optimal shadow map usage.
Definition: ShadowMap.cpp:710
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:666
ShadowMapInternals * m
Definition: ShadowMap.h:123
void PrepareCamera(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const int cascade)
Sets the renderer camera for the cascade.
Definition: ShadowMap.cpp:631
int GetCascadeCount() const
Returns the current number of used cascades.
Definition: ShadowMap.cpp:745
void RecreateTexture()
RecreateTexture: Destroy the current shadow texture and force creation of a new one.
Definition: ShadowMap.cpp:244
Definition: Canvas2D.h:30
Struct ShadowMapInternals: Internal data for the ShadowMap implementation.
Definition: ShadowMap.cpp:73