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

CPU methods for evaluating the atmospheric scattering model used by the sky background. More...

#include <MaterialSky.hpp>

Public Member Functions

 MaterialSky ()=delete
 

Static Public Member Functions

static glm::vec3 eval (const glm::vec3 &rayOrigin, const glm::vec3 &rayDir, const glm::vec3 &sunDir)
 

Static Private Member Functions

static float rayleighPhase (float cosAngle)
 
static float miePhase (float cosAngle)
 

Static Private Attributes

static const Sky::AtmosphereParameters sky
 Earth-like atmosphere parameters.
 
static const uint samplesCount = 16
 Number of samples to evaluate along the ray.
 

Detailed Description

CPU methods for evaluating the atmospheric scattering model used by the sky background.

Constructor & Destructor Documentation

◆ MaterialSky()

MaterialSky::MaterialSky ( )
delete

Constructor. (deleted)

Member Function Documentation

◆ eval()

glm::vec3 MaterialSky::eval ( const glm::vec3 &  rayOrigin,
const glm::vec3 &  rayDir,
const glm::vec3 &  sunDir 
)
static

Compute the radiance for a given ray, based on the atmosphere scattering model.

Parameters
rayOriginthe ray origin
rayDirthe ray direction
sunDirthe light direction
Returns
the estimated radiance

◆ miePhase()

float MaterialSky::miePhase ( float  cosAngle)
staticprivate

Compute the Mie phase.

Parameters
cosAngleCosine of the angle between the ray and the light directions
Returns
the phase

◆ rayleighPhase()

float MaterialSky::rayleighPhase ( float  cosAngle)
staticprivate

Compute the Rayleigh phase.

Parameters
cosAngleCosine of the angle between the ray and the light directions
Returns
the phase

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