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

Store environment probes data for forward rendering in a GPU buffer. More...

#include <ForwardLight.hpp>

Classes

struct  GPUProbe
 Represent a probe on the GPU for the forward renderer. More...
 

Public Member Functions

 ForwardProbe (size_t count)
 
void draw (const LightProbe &probe)
 
size_t count () const
 
const std::vector< const Texture * > & envmaps () const
 
const std::vector< const Buffer * > & shCoeffs () const
 
UniformBuffer< GPUProbe > & data ()
 

Private Attributes

size_t _currentId = 0
 Current insertion location.
 
size_t _currentCount = 0
 Number of probes to store.
 
UniformBuffer< GPUProbe_probesData
 GPU buffer.
 
std::vector< const Texture * > _probesMaps
 Environment maps list.
 
std::vector< const Buffer * > _probesCoeffs
 Environment SH coeffs list.
 

Static Private Attributes

static const size_t _maxProbeCount = 4
 Maximum allowed number of probes (see forward_lights.glsl).
 

Detailed Description

Store environment probes data for forward rendering in a GPU buffer.

Constructor & Destructor Documentation

◆ ForwardProbe()

ForwardProbe::ForwardProbe ( size_t  count)
explicit

Constructor.

Parameters
countnumber of probes that will be submitted

Member Function Documentation

◆ count()

size_t ForwardProbe::count ( ) const
inline
Returns
the current number of probes

◆ data()

UniformBuffer< GPUProbe > & ForwardProbe::data ( )
inline
Returns
the GPU probes recorded buffer

◆ draw()

void ForwardProbe::draw ( const LightProbe probe)

Record a light probe information for rendering.

Parameters
probethe probe to retrieve the info of

◆ envmaps()

const std::vector< const Texture * > & ForwardProbe::envmaps ( ) const
inline
Returns
the cubemaps used by the recorded probes

◆ shCoeffs()

const std::vector< const Buffer * > & ForwardProbe::shCoeffs ( ) const
inline
Returns
the SH irradiance coefficients used by the recorded probes

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