Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
VarianceShadowMap.hpp
1#pragma once
2
3#include "renderers/shadowmaps/ShadowMap.hpp"
4#include "scene/lights/Light.hpp"
5#include "scene/lights/PointLight.hpp"
6
12public:
17 explicit VarianceShadowMap2DArray(const std::vector<std::shared_ptr<Light>> & lights, const glm::vec2 & resolution);
18
20 void draw(const Scene & scene) override;
21
22private:
23
24 std::vector<std::shared_ptr<Light>> _lights;
28 std::unique_ptr<BoxBlur> _blur;
29
30};
31
37public:
42 explicit VarianceShadowMapCubeArray(const std::vector<std::shared_ptr<PointLight>> & lights, int side);
43
45 void draw(const Scene & scene) override;
46
47private:
48
49 std::vector<std::shared_ptr<PointLight>> _lights;
53 std::unique_ptr<BoxBlur> _blur;
54
55};
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Represents a 3D environment composed of objects, a background and additional environment lighting inf...
Definition: Scene.hpp:18
Store shadowing information as a map generated from the light viewpoint.
Definition: ShadowMap.hpp:25
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12
A 2D variance shadow map array, can be used for directional and spot lights. The shadow map will regi...
Definition: VarianceShadowMap.hpp:11
Program * _program
Shadow program.
Definition: VarianceShadowMap.hpp:25
void draw(const Scene &scene) override
Definition: VarianceShadowMap.cpp:19
Texture _mapDepth
Shadow map depth buffer.
Definition: VarianceShadowMap.hpp:27
std::vector< std::shared_ptr< Light > > _lights
The associated light.
Definition: VarianceShadowMap.hpp:24
std::unique_ptr< BoxBlur > _blur
Blur filter.
Definition: VarianceShadowMap.hpp:28
Texture _map
Raw shadow map result.
Definition: VarianceShadowMap.hpp:26
A cube variance shadow map array, can be used for point lights. Each face of the map is updated seque...
Definition: VarianceShadowMap.hpp:36
Program * _program
Shadow program.
Definition: VarianceShadowMap.hpp:50
Texture _map
Raw shadow map result.
Definition: VarianceShadowMap.hpp:51
std::vector< std::shared_ptr< PointLight > > _lights
The associated lights.
Definition: VarianceShadowMap.hpp:49
std::unique_ptr< BoxBlur > _blur
Blur filter.
Definition: VarianceShadowMap.hpp:53
Texture _mapDepth
Shadow map depth buffer.
Definition: VarianceShadowMap.hpp:52
void draw(const Scene &scene) override
Definition: VarianceShadowMap.cpp:79