Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
BasicShadowMap.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:
18 explicit BasicShadowMap2DArray(const std::vector<std::shared_ptr<Light>> & lights, const glm::vec2 & resolution, ShadowMode mode);
19
21 void draw(const Scene & scene) override;
22
23private:
24
25 std::vector<std::shared_ptr<Light>> _lights;
28
29};
30
36public:
42 explicit BasicShadowMapCubeArray(const std::vector<std::shared_ptr<PointLight>> & lights, int side, ShadowMode mode);
43
45 void draw(const Scene & scene) override;
46
47private:
48
49 std::vector<std::shared_ptr<PointLight>> _lights;
52
53};
54
55
61public:
65 explicit EmptyShadowMap2DArray(const std::vector<std::shared_ptr<Light>> & lights);
66
68 void draw(const Scene & scene) override;
69
70private:
71
72};
73
79public:
83 explicit EmptyShadowMapCubeArray(const std::vector<std::shared_ptr<PointLight>> & lights);
84
86 void draw(const Scene & scene) override;
87
88private:
89
90};
A 2D shadow map array, can be used for directional and spot lights. The shadow map will register itse...
Definition: BasicShadowMap.hpp:11
void draw(const Scene &scene) override
Definition: BasicShadowMap.cpp:16
std::vector< std::shared_ptr< Light > > _lights
The associated light.
Definition: BasicShadowMap.hpp:25
Program * _program
Shadow program.
Definition: BasicShadowMap.hpp:26
Texture _map
Shadow map result.
Definition: BasicShadowMap.hpp:27
A cube shadow map array, can be used for point lights. Each face of the map is updated sequentially....
Definition: BasicShadowMap.hpp:35
std::vector< std::shared_ptr< PointLight > > _lights
The associated lights.
Definition: BasicShadowMap.hpp:49
void draw(const Scene &scene) override
Definition: BasicShadowMap.cpp:67
Program * _program
Shadow program.
Definition: BasicShadowMap.hpp:50
Texture _map
Shadow map result.
Definition: BasicShadowMap.hpp:51
A dummy shadow map array, can be used for directional and spot lights. The shadow map will register i...
Definition: BasicShadowMap.hpp:60
void draw(const Scene &scene) override
Definition: BasicShadowMap.cpp:122
A dummy cube shadow map array, can be used for point lights. The shadow map will register itself with...
Definition: BasicShadowMap.hpp:78
void draw(const Scene &scene) override
Definition: BasicShadowMap.cpp:131
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
ShadowMode
Available shadow mapping techniques.
Definition: ShadowMap.hpp:14