Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
VarianceShadowMapCubeArray Class Reference

A cube variance shadow map array, can be used for point lights. Each face of the map is updated sequentially. 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

 VarianceShadowMapCubeArray (const std::vector< std::shared_ptr< PointLight > > &lights, int side)
 
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
 
ShadowMapoperator= (const ShadowMap &)=delete
 
 ShadowMap (ShadowMap &&)=default
 
ShadowMapoperator= (ShadowMap &&)=delete
 

Private Attributes

std::vector< std::shared_ptr< PointLight > > _lights
 The associated lights.
 
Program_program
 Shadow program.
 
Texture _map
 Raw shadow map result.
 
Texture _mapDepth
 Shadow map depth buffer.
 
std::unique_ptr< BoxBlur_blur
 Blur filter.
 

Detailed Description

A cube variance shadow map array, can be used for point lights. Each face of the map is updated sequentially. 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.

Constructor & Destructor Documentation

◆ VarianceShadowMapCubeArray()

VarianceShadowMapCubeArray::VarianceShadowMapCubeArray ( const std::vector< std::shared_ptr< PointLight > > &  lights,
int  side 
)
explicit

Constructor.

Parameters
lightsthe lights to generate the associated shadow maps for
sidethe shadow map resolution

Member Function Documentation

◆ draw()

void VarianceShadowMapCubeArray::draw ( const Scene scene)
overridevirtual


Update the shadow map.

Parameters
scenethe objcts to draw in the map.

Implements ShadowMap.


The documentation for this class was generated from the following files: