CPU methods for evaluating the atmospheric scattering model used by the sky background.
More...
#include <MaterialSky.hpp>
|
| static glm::vec3 | eval (const glm::vec3 &rayOrigin, const glm::vec3 &rayDir, const glm::vec3 &sunDir) |
| |
|
|
static const Sky::AtmosphereParameters | sky |
| | Earth-like atmosphere parameters.
|
| |
|
static const uint | samplesCount = 16 |
| | Number of samples to evaluate along the ray.
|
| |
CPU methods for evaluating the atmospheric scattering model used by the sky background.
◆ MaterialSky()
| MaterialSky::MaterialSky |
( |
| ) |
|
|
delete |
◆ 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
-
| rayOrigin | the ray origin |
| rayDir | the ray direction |
| sunDir | the light direction |
- Returns
- the estimated radiance
◆ miePhase()
| float MaterialSky::miePhase |
( |
float |
cosAngle | ) |
|
|
staticprivate |
Compute the Mie phase.
- Parameters
-
| cosAngle | Cosine 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
-
| cosAngle | Cosine of the angle between the ray and the light directions |
- Returns
- the phase
The documentation for this class was generated from the following files: