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

#include <sky-pass.hpp>

Inheritance diagram for render::sky_pass:
render::pass

Public Member Functions

 sky_pass (gl::pipeline *pipeline, const gl::framebuffer *framebuffer, resource_manager *resource_manager)
 
virtual ~sky_pass ()=default
 
void render (render::context &ctx) override
 
void update_tweens ()
 
void set_magnification (float scale)
 
void set_sky_model (std::shared_ptr< render::model > model)
 
void set_moon_model (std::shared_ptr< render::model > model)
 
void set_stars_model (std::shared_ptr< render::model > model)
 
void set_icrf_to_eus (const math::se3< float > &transformation)
 
void set_sun_position (const math::fvec3 &position)
 
void set_sun_luminance (const math::fvec3 &luminance)
 
void set_sun_illuminance (const math::fvec3 &illuminance, const math::fvec3 &transmitted_illuminance)
 
void set_sun_angular_radius (float radius)
 
void set_planet_radius (float radius)
 
void set_atmosphere_upper_limit (float limit)
 
void set_observer_elevation (float elevation)
 
void set_rayleigh_parameters (float scale_height, const math::fvec3 &scattering)
 
void set_mie_parameters (float scale_height, float scattering, float extinction, float anisotropy)
 
void set_ozone_parameters (float lower_limit, float upper_limit, float mode, const math::fvec3 &absorption)
 
void set_airglow_luminance (const math::fvec3 &luminance)
 
void set_ground_albedo (const math::fvec3 &albedo)
 
void set_moon_position (const math::fvec3 &position)
 
void set_moon_rotation (const math::fquat &rotation)
 
void set_moon_angular_radius (float angular_radius)
 
void set_moon_sunlight_direction (const math::fvec3 &direction)
 
void set_moon_sunlight_illuminance (const math::fvec3 &illuminance)
 
void set_moon_planetlight_direction (const math::fvec3 &direction)
 
void set_moon_planetlight_illuminance (const math::fvec3 &illuminance)
 
void set_moon_illuminance (const math::fvec3 &illuminance, const math::fvec3 &transmitted_illuminance)
 
void set_sky_probe (std::shared_ptr< scene::light_probe > probe)
 
constexpr void set_layer_mask (std::uint32_t mask) noexcept
 Sets the layer mask of the sky. More...
 
Transmittance LUT
void set_transmittance_lut_sample_count (std::uint16_t count)
 Sets the number of transmittance integration samples. More...
 
void set_transmittance_lut_resolution (const math::vec2< std::uint16_t > &resolution)
 Sets the resolution of the transmittance LUT. More...
 
std::uint16_t get_transmittance_lut_sample_count () const noexcept
 Returns the number of transmittance integration samples. More...
 
const math::vec2< std::uint16_t > & get_transmittance_lut_resolution () const noexcept
 Returns the resolution of the transmittance LUT texture, in pixels. More...
 
Multiscattering LUT
void set_multiscattering_lut_direction_sample_count (std::uint16_t count)
 Sets the number of multiscattering directions to sample. More...
 
void set_multiscattering_lut_scatter_sample_count (std::uint16_t count)
 Sets the number of multiscattering scatter events to sample per sample direction. More...
 
void set_multiscattering_lut_resolution (const math::vec2< std::uint16_t > &resolution)
 Sets the resolution of the multiscattering LUT. More...
 
std::uint16_t get_multiscattering_lut_direction_sample_count () const noexcept
 Returns the number of multiscattering direction samples. More...
 
std::uint16_t get_multiscattering_lut_scatter_sample_count () const noexcept
 Returns the number of multiscattering scatter samples per direction. More...
 
const math::vec2< std::uint16_t > & get_multiscattering_lut_resolution () const noexcept
 Returns the resolution of the multiscattering LUT texture, in pixels. More...
 
Luminance LUT
void set_luminance_lut_sample_count (std::uint16_t count)
 Sets the number of luminance integration samples. More...
 
void set_luminance_lut_resolution (const math::vec2< std::uint16_t > &resolution)
 Sets the resolution of the luminance LUT. More...
 
std::uint16_t get_luminance_lut_sample_count () const noexcept
 Returns the number of luminance integration samples. More...
 
const math::vec2< std::uint16_t > & get_luminance_lut_resolution () const noexcept
 Returns the resolution of the luminance LUT texture, in pixels. More...
 
- Public Member Functions inherited from render::pass
 pass (gl::pipeline *pipeline, const gl::framebuffer *framebuffer)
 
virtual ~pass ()
 
void set_enabled (bool enabled)
 
constexpr bool is_enabled () const noexcept
 
void set_framebuffer (const gl::framebuffer *framebuffer)
 
void set_clear_mask (std::uint8_t mask) noexcept
 
void set_clear_value (const gl::clear_value &value) noexcept
 
void clear ()
 

Additional Inherited Members

- Protected Attributes inherited from render::pass
gl::pipelinem_pipeline
 
const gl::framebufferm_framebuffer
 
std::uint8_t m_clear_mask {}
 
gl::clear_value m_clear_value
 

Detailed Description

See also
Hillaire, Sébastien. "A scalable and production ready sky and atmosphere rendering technique." Computer Graphics Forum. Vol. 39. No. 4. 2020.

Definition at line 49 of file sky-pass.hpp.

Constructor & Destructor Documentation

◆ sky_pass()

render::sky_pass::sky_pass ( gl::pipeline pipeline,
const gl::framebuffer framebuffer,
resource_manager resource_manager 
)

Definition at line 44 of file sky-pass.cpp.

◆ ~sky_pass()

virtual render::sky_pass::~sky_pass ( )
virtualdefault

Member Function Documentation

◆ get_luminance_lut_resolution()

const math::vec2<std::uint16_t>& render::sky_pass::get_luminance_lut_resolution ( ) const
inlinenoexcept

Returns the resolution of the luminance LUT texture, in pixels.

Definition at line 171 of file sky-pass.hpp.

◆ get_luminance_lut_sample_count()

std::uint16_t render::sky_pass::get_luminance_lut_sample_count ( ) const
inlinenoexcept

Returns the number of luminance integration samples.

Definition at line 165 of file sky-pass.hpp.

◆ get_multiscattering_lut_direction_sample_count()

std::uint16_t render::sky_pass::get_multiscattering_lut_direction_sample_count ( ) const
inlinenoexcept

Returns the number of multiscattering direction samples.

Definition at line 124 of file sky-pass.hpp.

◆ get_multiscattering_lut_resolution()

const math::vec2<std::uint16_t>& render::sky_pass::get_multiscattering_lut_resolution ( ) const
inlinenoexcept

Returns the resolution of the multiscattering LUT texture, in pixels.

Definition at line 136 of file sky-pass.hpp.

◆ get_multiscattering_lut_scatter_sample_count()

std::uint16_t render::sky_pass::get_multiscattering_lut_scatter_sample_count ( ) const
inlinenoexcept

Returns the number of multiscattering scatter samples per direction.

Definition at line 130 of file sky-pass.hpp.

◆ get_transmittance_lut_resolution()

const math::vec2<std::uint16_t>& render::sky_pass::get_transmittance_lut_resolution ( ) const
inlinenoexcept

Returns the resolution of the transmittance LUT texture, in pixels.

Definition at line 85 of file sky-pass.hpp.

◆ get_transmittance_lut_sample_count()

std::uint16_t render::sky_pass::get_transmittance_lut_sample_count ( ) const
inlinenoexcept

Returns the number of transmittance integration samples.

Definition at line 79 of file sky-pass.hpp.

◆ render()

void render::sky_pass::render ( render::context ctx)
overridevirtual

Implements render::pass.

Definition at line 148 of file sky-pass.cpp.

◆ set_airglow_luminance()

void render::sky_pass::set_airglow_luminance ( const math::fvec3 luminance)

Definition at line 813 of file sky-pass.cpp.

◆ set_atmosphere_upper_limit()

void render::sky_pass::set_atmosphere_upper_limit ( float  limit)

Definition at line 751 of file sky-pass.cpp.

◆ set_ground_albedo()

void render::sky_pass::set_ground_albedo ( const math::fvec3 albedo)

Definition at line 818 of file sky-pass.cpp.

◆ set_icrf_to_eus()

void render::sky_pass::set_icrf_to_eus ( const math::se3< float > &  transformation)

Definition at line 710 of file sky-pass.cpp.

◆ set_layer_mask()

constexpr void render::sky_pass::set_layer_mask ( std::uint32_t  mask)
inlineconstexprnoexcept

Sets the layer mask of the sky.

Parameters
mask32-bit layer mask in which each set bit represents a layer in which the sky is visible.

Definition at line 219 of file sky-pass.hpp.

◆ set_luminance_lut_resolution()

void render::sky_pass::set_luminance_lut_resolution ( const math::vec2< std::uint16_t > &  resolution)

Sets the resolution of the luminance LUT.

Parameters
resolutionResolution of the luminance LUT texture, in pixels.
Note
Triggers rendering of luminance LUT.

Definition at line 521 of file sky-pass.cpp.

◆ set_luminance_lut_sample_count()

void render::sky_pass::set_luminance_lut_sample_count ( std::uint16_t  count)

Sets the number of luminance integration samples.

Parameters
countIntegration sample count.
Note
Triggers rebuilding of luminance LUT shader.
Triggers rendering of luminance LUT.

Definition at line 506 of file sky-pass.cpp.

◆ set_magnification()

void render::sky_pass::set_magnification ( float  scale)

Definition at line 705 of file sky-pass.cpp.

◆ set_mie_parameters()

void render::sky_pass::set_mie_parameters ( float  scale_height,
float  scattering,
float  extinction,
float  anisotropy 
)

Definition at line 783 of file sky-pass.cpp.

◆ set_moon_angular_radius()

void render::sky_pass::set_moon_angular_radius ( float  angular_radius)

Definition at line 836 of file sky-pass.cpp.

◆ set_moon_illuminance()

void render::sky_pass::set_moon_illuminance ( const math::fvec3 illuminance,
const math::fvec3 transmitted_illuminance 
)

Definition at line 861 of file sky-pass.cpp.

◆ set_moon_model()

void render::sky_pass::set_moon_model ( std::shared_ptr< render::model model)

Definition at line 590 of file sky-pass.cpp.

◆ set_moon_planetlight_direction()

void render::sky_pass::set_moon_planetlight_direction ( const math::fvec3 direction)

Definition at line 851 of file sky-pass.cpp.

◆ set_moon_planetlight_illuminance()

void render::sky_pass::set_moon_planetlight_illuminance ( const math::fvec3 illuminance)

Definition at line 856 of file sky-pass.cpp.

◆ set_moon_position()

void render::sky_pass::set_moon_position ( const math::fvec3 position)

Definition at line 826 of file sky-pass.cpp.

◆ set_moon_rotation()

void render::sky_pass::set_moon_rotation ( const math::fquat rotation)

Definition at line 831 of file sky-pass.cpp.

◆ set_moon_sunlight_direction()

void render::sky_pass::set_moon_sunlight_direction ( const math::fvec3 direction)

Definition at line 841 of file sky-pass.cpp.

◆ set_moon_sunlight_illuminance()

void render::sky_pass::set_moon_sunlight_illuminance ( const math::fvec3 illuminance)

Definition at line 846 of file sky-pass.cpp.

◆ set_multiscattering_lut_direction_sample_count()

void render::sky_pass::set_multiscattering_lut_direction_sample_count ( std::uint16_t  count)

Sets the number of multiscattering directions to sample.

Parameters
countMultiscattering direction sample count.
Note
Triggers rebuilding of multiscattering LUT shader.
Triggers rendering of multiscattering LUT.

Definition at line 463 of file sky-pass.cpp.

◆ set_multiscattering_lut_resolution()

void render::sky_pass::set_multiscattering_lut_resolution ( const math::vec2< std::uint16_t > &  resolution)

Sets the resolution of the multiscattering LUT.

Parameters
resolutionResolution of the multiscattering LUT texture, in pixels.
Note
Triggers rendering of multiscattering LUT.

Definition at line 493 of file sky-pass.cpp.

◆ set_multiscattering_lut_scatter_sample_count()

void render::sky_pass::set_multiscattering_lut_scatter_sample_count ( std::uint16_t  count)

Sets the number of multiscattering scatter events to sample per sample direction.

Parameters
countMultiscattering scatter sample count.
Note
Triggers rebuilding of multiscattering LUT shader.
Triggers rendering of multiscattering LUT.

Definition at line 478 of file sky-pass.cpp.

◆ set_observer_elevation()

void render::sky_pass::set_observer_elevation ( float  elevation)

Definition at line 762 of file sky-pass.cpp.

◆ set_ozone_parameters()

void render::sky_pass::set_ozone_parameters ( float  lower_limit,
float  upper_limit,
float  mode,
const math::fvec3 absorption 
)

Definition at line 798 of file sky-pass.cpp.

◆ set_planet_radius()

void render::sky_pass::set_planet_radius ( float  radius)

Definition at line 737 of file sky-pass.cpp.

◆ set_rayleigh_parameters()

void render::sky_pass::set_rayleigh_parameters ( float  scale_height,
const math::fvec3 scattering 
)

Definition at line 768 of file sky-pass.cpp.

◆ set_sky_model()

void render::sky_pass::set_sky_model ( std::shared_ptr< render::model model)

Definition at line 534 of file sky-pass.cpp.

◆ set_sky_probe()

void render::sky_pass::set_sky_probe ( std::shared_ptr< scene::light_probe probe)

Definition at line 867 of file sky-pass.cpp.

◆ set_stars_model()

void render::sky_pass::set_stars_model ( std::shared_ptr< render::model model)

Definition at line 643 of file sky-pass.cpp.

◆ set_sun_angular_radius()

void render::sky_pass::set_sun_angular_radius ( float  radius)

Definition at line 732 of file sky-pass.cpp.

◆ set_sun_illuminance()

void render::sky_pass::set_sun_illuminance ( const math::fvec3 illuminance,
const math::fvec3 transmitted_illuminance 
)

Definition at line 721 of file sky-pass.cpp.

◆ set_sun_luminance()

void render::sky_pass::set_sun_luminance ( const math::fvec3 luminance)

Definition at line 727 of file sky-pass.cpp.

◆ set_sun_position()

void render::sky_pass::set_sun_position ( const math::fvec3 position)

Definition at line 716 of file sky-pass.cpp.

◆ set_transmittance_lut_resolution()

void render::sky_pass::set_transmittance_lut_resolution ( const math::vec2< std::uint16_t > &  resolution)

Sets the resolution of the transmittance LUT.

Parameters
resolutionResolution of the transmittance LUT texture, in pixels.
Note
Triggers rendering of transmittance LUT.

Definition at line 450 of file sky-pass.cpp.

◆ set_transmittance_lut_sample_count()

void render::sky_pass::set_transmittance_lut_sample_count ( std::uint16_t  count)

Sets the number of transmittance integration samples.

Parameters
countIntegration sample count.
Note
Triggers rebuilding of transmittance LUT shader.
Triggers rendering of transmittance LUT.

Definition at line 435 of file sky-pass.cpp.

◆ update_tweens()

void render::sky_pass::update_tweens ( )

Definition at line 686 of file sky-pass.cpp.


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