Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
MaterialSky.hpp
1#pragma once
2#include "scene/Scene.hpp"
3#include "scene/Sky.hpp"
4#include "Common.hpp"
5
11public:
12
14 MaterialSky() = delete;
15
22 static glm::vec3 eval(const glm::vec3 & rayOrigin, const glm::vec3 & rayDir, const glm::vec3 & sunDir);
23
24private:
25
30 static float rayleighPhase(float cosAngle);
31
36 static float miePhase(float cosAngle);
37
39 static const uint samplesCount = 16;
40
41};
CPU methods for evaluating the atmospheric scattering model used by the sky background.
Definition: MaterialSky.hpp:10
static float miePhase(float cosAngle)
Definition: MaterialSky.cpp:94
MaterialSky()=delete
static float rayleighPhase(float cosAngle)
Definition: MaterialSky.cpp:89
static const uint samplesCount
Number of samples to evaluate along the ray.
Definition: MaterialSky.hpp:39
static glm::vec3 eval(const glm::vec3 &rayOrigin, const glm::vec3 &rayDir, const glm::vec3 &sunDir)
Definition: MaterialSky.cpp:6
static const Sky::AtmosphereParameters sky
Earth-like atmosphere parameters.
Definition: MaterialSky.hpp:38
Atmosphere parameters. Default values correspond to Earth-like atmosphere.
Definition: Sky.hpp:53