Atmosphere general shader.
More...
|
AtmosphereParameters | defaultAtmosphere = AtmosphereParameters(vec3(1.474, 1.8504, 1.91198), vec3(5.5e-6, 13.0e-6, 22.4e-6), 6371e3, 6471e3, 20.0, 21e-6, 8000.0, 1200.0, 0.758, 0.04675, 0.998) |
|
◆ computeAtmosphereRadiance()
vec3 GPUShaders::Common::Atmosphere::computeAtmosphereRadiance |
( |
vec3 |
rayOrigin, |
|
|
vec3 |
rayDir, |
|
|
vec3 |
sunDir, |
|
|
texture2D |
scatterTable, |
|
|
AtmosphereParameters |
params |
|
) |
| |
|
inline |
Compute the radiance for a given ray, based on the atmosphere scattering model.
- Parameters
-
rayOrigin | the ray origin in ground space |
rayDir | the ray direction |
sunDir | the light direction |
scatterTable | the precomputed secondary scattering lookup table |
params | atmosphere physics parameters |
- Returns
- the estimated radiance
◆ miePhase()
float GPUShaders::Common::Atmosphere::miePhase |
( |
float |
cosAngle, |
|
|
float |
gMie |
|
) |
| |
|
inline |
Compute the Mie phase.
- Parameters
-
cosAngle | Cosine of the angle between the ray and the light directions |
gMie | the Mie atmosphere parameter |
- Returns
- the phase
◆ rayleighPhase()
float GPUShaders::Common::Atmosphere::rayleighPhase |
( |
float |
cosAngle | ) |
|
|
inline |
Compute the Rayleigh phase.
- Parameters
-
cosAngle | Cosine of the angle between the ray and the light directions |
- Returns
- the phase
◆ defaultAtmosphere
AtmosphereParameters GPUShaders::Common::Atmosphere::defaultAtmosphere = AtmosphereParameters(vec3(1.474, 1.8504, 1.91198), vec3(5.5e-6, 13.0e-6, 22.4e-6), 6371e3, 6471e3, 20.0, 21e-6, 8000.0, 1200.0, 0.758, 0.04675, 0.998) |
Default atmosphere parameters.
The documentation for this class was generated from the following file:
- resources/common/shaders/background/atmosphere.glsl