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

A 2D shadow map array, can be used for directional and spot lights. The shadow map will register itself with the associated lights. More...

#include <BasicShadowMap.hpp>

Public Member Functions

 BasicShadowMap2DArray (const std::vector< std::shared_ptr< Light > > &lights, const glm::vec2 &resolution, ShadowMode mode)
 
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< Light > > _lights
 The associated light.
 
Program_program
 Shadow program.
 
Texture _map
 Shadow map result.
 

Detailed Description

A 2D shadow map array, can be used for directional and spot lights. The shadow map will register itself with the associated lights.

Inherits ShadowMap.

Constructor & Destructor Documentation

◆ BasicShadowMap2DArray()

BasicShadowMap2DArray::BasicShadowMap2DArray ( const std::vector< std::shared_ptr< Light > > &  lights,
const glm::vec2 &  resolution,
ShadowMode  mode 
)
explicit

Constructor.

Parameters
lightsthe lights to generate the associated shadow maps for
resolutionthe shadow map resolution
modethe type of shadow map technique used
Bug:
The depth buffer will contain extra garbage data and can't be used as an input to the light pass currently.

Member Function Documentation

◆ draw()

void BasicShadowMap2DArray::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: