Rendu
A lightweight rendering engine for experimentations
Main Page
Modules
Namespaces
Classes
Files
Related Pages
File List
Loading...
Searching...
No Matches
src
engine
renderers
shadowmaps
ShadowMap.hpp
1
#pragma once
2
3
#include "processing/BoxBlur.hpp"
4
#include "resources/Texture.hpp"
5
6
#include "Common.hpp"
7
8
class
Scene
;
9
14
enum class
ShadowMode
:
int
{
15
NONE
= 0,
16
BASIC
= 1,
17
PCF
= 2,
18
VARIANCE
= 3
19
};
20
25
class
ShadowMap
{
26
public
:
28
ShadowMap
() =
default
;
29
33
virtual
void
draw
(
const
Scene
& scene) = 0;
34
36
virtual
~ShadowMap
() =
default
;
37
39
ShadowMap
(
const
ShadowMap
&) =
delete
;
40
44
ShadowMap
&
operator=
(
const
ShadowMap
&) =
delete
;
45
47
ShadowMap
(
ShadowMap
&&) =
default
;
48
52
ShadowMap
&
operator=
(
ShadowMap
&&) =
delete
;
53
55
struct
Region
{
56
const
Texture
*
map
=
nullptr
;
57
ShadowMode
mode
= ShadowMode::NONE;
58
glm::vec2
minUV
= glm::vec2(0.0f);
59
glm::vec2
maxUV
= glm::vec2(0.0f);
60
size_t
layer
= 0;
61
float
bias
= 0.002f;
62
};
63
64
};
Scene
Represents a 3D environment composed of objects, a background and additional environment lighting inf...
Definition:
Scene.hpp:18
ShadowMap
Store shadowing information as a map generated from the light viewpoint.
Definition:
ShadowMap.hpp:25
ShadowMap::draw
virtual void draw(const Scene &scene)=0
ShadowMap::ShadowMap
ShadowMap(ShadowMap &&)=default
ShadowMap::operator=
ShadowMap & operator=(const ShadowMap &)=delete
ShadowMap::~ShadowMap
virtual ~ShadowMap()=default
ShadowMap::operator=
ShadowMap & operator=(ShadowMap &&)=delete
ShadowMap::ShadowMap
ShadowMap()=default
ShadowMap::ShadowMap
ShadowMap(const ShadowMap &)=delete
Texture
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition:
Texture.hpp:12
ShadowMode
ShadowMode
Available shadow mapping techniques.
Definition:
ShadowMap.hpp:14
ShadowMode::PCF
@ PCF
Basic depth test mode.
ShadowMode::NONE
@ NONE
No shadows.
ShadowMode::VARIANCE
@ VARIANCE
Variance shadow map.
ShadowMode::BASIC
@ BASIC
Basic depth test mode.
ShadowMap::Region
Definition:
ShadowMap.hpp:55
ShadowMap::Region::layer
size_t layer
The layer containing the shadow map.
Definition:
ShadowMap.hpp:60
ShadowMap::Region::map
const Texture * map
The texture reference.
Definition:
ShadowMap.hpp:56
ShadowMap::Region::minUV
glm::vec2 minUV
The bottom-left corner of the texture region.
Definition:
ShadowMap.hpp:58
ShadowMap::Region::maxUV
glm::vec2 maxUV
The upper-right corner of the texture region.
Definition:
ShadowMap.hpp:59
ShadowMap::Region::bias
float bias
The depth bias to use.
Definition:
ShadowMap.hpp:61
ShadowMap::Region::mode
ShadowMode mode
The shadow mode to use.
Definition:
ShadowMap.hpp:57
Generated by
Doxygen
1.9.5 - Theme by
Simon Rodriguez