Rendu
A lightweight rendering engine for experimentations
|
A 2D variance shadow map array, can be used for directional and spot lights. The shadow map will register itself with the associated lights. Implement variance shadow mapping to filter the shadows and get correct smoother edges. More...
#include <VarianceShadowMap.hpp>
Public Member Functions | |
VarianceShadowMap2DArray (const std::vector< std::shared_ptr< Light > > &lights, const glm::vec2 &resolution) | |
void | draw (const Scene &scene) override |
More... | |
Public Member Functions inherited from ShadowMap | |
ShadowMap ()=default | |
virtual void | draw (const Scene &scene)=0 |
virtual | ~ShadowMap ()=default |
ShadowMap (const ShadowMap &)=delete | |
ShadowMap & | operator= (const ShadowMap &)=delete |
ShadowMap (ShadowMap &&)=default | |
ShadowMap & | operator= (ShadowMap &&)=delete |
Private Attributes | |
std::vector< std::shared_ptr< Light > > | _lights |
The associated light. | |
Program * | _program |
Shadow program. | |
Texture | _map |
Raw shadow map result. | |
Texture | _mapDepth |
Shadow map depth buffer. | |
std::unique_ptr< BoxBlur > | _blur |
Blur filter. | |
A 2D variance shadow map array, can be used for directional and spot lights. The shadow map will register itself with the associated lights. Implement variance shadow mapping to filter the shadows and get correct smoother edges.
Inherits ShadowMap.
|
explicit |
Constructor.
lights | the lights to generate the associated shadow maps for |
resolution | the shadow map resolution |
|
overridevirtual |