Antkeeper  0.0.1
Public Member Functions | List of all members
render::light_probe_stage Class Reference

Updates light probes. More...

#include <light-probe-stage.hpp>

Inheritance diagram for render::light_probe_stage:
render::stage

Public Member Functions

 light_probe_stage (gl::pipeline &pipeline, ::resource_manager &resource_manager)
 Constructs a light probe stage. More...
 
void execute (render::context &ctx) override
 Executes the render stage. More...
 
void set_sh_sample_count (std::size_t count)
 Sets the number of samples to use when projecting luminance cubemaps into spherical harmonics. More...
 
void set_cubemap_filter_sample_count (std::size_t count)
 Sets the number of samples to use when filtering luminance cubemap mip chains. More...
 
void set_cubemap_filter_mip_bias (float bias)
 Sets the mip bias to use when filtering luminance cubemap mip chains. More...
 
std::size_t get_sh_sample_count () const noexcept
 Returns the number of samples used when projecting luminance cubemaps into spherical harmonics. More...
 
std::size_t get_cubemap_filter_sample_count () const noexcept
 Returns the number of samples used when filtering luminance cubemaps. More...
 
- Public Member Functions inherited from render::stage
virtual ~stage ()=default
 Destructs a render stage. More...
 

Detailed Description

Updates light probes.

Definition at line 40 of file light-probe-stage.hpp.

Constructor & Destructor Documentation

◆ light_probe_stage()

render::light_probe_stage::light_probe_stage ( gl::pipeline pipeline,
::resource_manager resource_manager 
)

Constructs a light probe stage.

Parameters
pipelineGraphics pipeline.
resource_managerResource manager for loading shader templates.
Exceptions
std::runtime_errorFailed to build cubemap to spherical harmonics shader program.
std::runtime_errorCubemap to spherical harmonics shader program has no cubemap variable.
std::runtime_errorFailed to build cubemap downsample shader program.
std::runtime_errorCubemap downsample shader program has no cubemap variable.
std::runtime_errorFailed to build cubemap filter LUT shader program.
std::runtime_errorCubemap filter LUT shader program is missing one or more required shader variables.

Definition at line 30 of file light-probe-stage.cpp.

Member Function Documentation

◆ execute()

void render::light_probe_stage::execute ( render::context ctx)
overridevirtual

Executes the render stage.

Parameters
ctxRender context.

Implements render::stage.

Definition at line 125 of file light-probe-stage.cpp.

◆ get_cubemap_filter_sample_count()

std::size_t render::light_probe_stage::get_cubemap_filter_sample_count ( ) const
inlinenoexcept

Returns the number of samples used when filtering luminance cubemaps.

Definition at line 99 of file light-probe-stage.hpp.

◆ get_sh_sample_count()

std::size_t render::light_probe_stage::get_sh_sample_count ( ) const
inlinenoexcept

Returns the number of samples used when projecting luminance cubemaps into spherical harmonics.

Definition at line 93 of file light-probe-stage.hpp.

◆ set_cubemap_filter_mip_bias()

void render::light_probe_stage::set_cubemap_filter_mip_bias ( float  bias)

Sets the mip bias to use when filtering luminance cubemap mip chains.

Parameters
biasCubemap filter mip bias.
Warning
Triggers recalculation of the luminance of all light probes on next call to execute().
Exceptions
std::runtime_errorFailed to build cubemap filter LUT shader program.
std::runtime_errorCubemap filter LUT shader program is missing one or more required shader variables.

Definition at line 318 of file light-probe-stage.cpp.

◆ set_cubemap_filter_sample_count()

void render::light_probe_stage::set_cubemap_filter_sample_count ( std::size_t  count)

Sets the number of samples to use when filtering luminance cubemap mip chains.

Parameters
countCubemap filter sample count.

Definition at line 309 of file light-probe-stage.cpp.

◆ set_sh_sample_count()

void render::light_probe_stage::set_sh_sample_count ( std::size_t  count)

Sets the number of samples to use when projecting luminance cubemaps into spherical harmonics.

Parameters
countSpherical harmonics sample count.
Warning
Triggers rebuilding of cubemap to spherical harmonics shader program.
Triggers recalculation of the illuminance of all light probes on next call to execute().
Exceptions
std::runtime_errorFailed to build cubemap to spherical harmonics shader program.
std::runtime_errorCubemap to spherical harmonics shader program has no cubemap variable.

Definition at line 300 of file light-probe-stage.cpp.


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