8#include "core/reflect.h"
10namespace Vkm::Engine {
22 bool procedural =
true;
60 glm::vec3 moonlightColor = {0.55f, 0.65f, 1.0f};
61 float moonlightIntensity = 0.12f;
81 glm::vec3
albedo = {0.8f, 0.85f, 1.0f};
141 return {sky.sunElevation, sky.sunAzimuth};
152 return {-sky.sunElevation + night.moonTilt, sky.sunAzimuth + 180.0f};
198 VKM_F(sunAngularRadius)
199 VKM_F(sunDiscIntensity)
203 VKM_F(lightIntensity)
206VKM_REFLECT_BEGIN(::Vkm::Engine::NightSkySettings)
209 VKM_F(moonAngularRadius)
213 VKM_F(moonlightColor)
214 VKM_F(moonlightIntensity)
217VKM_REFLECT_BEGIN(::Vkm::Engine::FogSettings)
230VKM_REFLECT_BEGIN(::Vkm::Engine::Environment)
The scene's lighting environment: sky, night sky and fog.
Definition environment.h:130
SkyAngles moonAngles() const
Where the moon sits: opposite the sun, tilted off that axis.
Definition environment.h:151
SkyAngles sunAngles() const
Where the sun sits, straight off the authored fields.
Definition environment.h:140
static glm::vec3 directionFromAngles(float elevationDeg, float azimuthDeg)
Unit direction for an elevation/azimuth pair, both in degrees.
glm::vec3 moonDirection() const
Direction TO the moon.
Definition environment.h:172
glm::vec3 sunDirection() const
Direction TO the sun from the authored angles.
Definition environment.h:162
Froxel volumetric fog: a compute pass scatters the scene lights through a height-falloff medium and a...
Definition environment.h:75
static constexpr uint32_t MAX_FROXEL_COUNT
The most froxels the whole grid holds; a grid over it is scaled down evenly.
Definition environment.h:102
glm::vec3 albedo
Scattering tint.
Definition environment.h:81
uint32_t resolutionX
Screen tiles; higher = sharper shafts.
Definition environment.h:82
uint32_t resolutionY
Screen tiles.
Definition environment.h:83
float maxDistance
How far from the eye the slices reach, in metres.
Definition environment.h:90
float density
Base extinction at height.
Definition environment.h:77
glm::uvec3 froxelGrid() const
The grid the volume is allocated at: the authored one, bounded.
static constexpr uint32_t MAX_FROXELS
Per axis.
Definition environment.h:96
static constexpr uint32_t MIN_FROXELS
Per axis.
Definition environment.h:95
float heightFalloff
Density e-folding per world unit above height.
Definition environment.h:79
float height
World Y where the medium is densest.
Definition environment.h:78
uint32_t resolutionZ
Exponential slices.
Definition environment.h:84
float anisotropy
Henyey-Greenstein g, within MAX_ANISOTROPY.
Definition environment.h:80
static constexpr float MAX_ANISOTROPY
At +-1 the phase function divides zero by zero.
Definition environment.h:93
What the sky is once the sun is down.
Definition environment.h:49
float starDensity
Higher packs more, smaller stars.
Definition environment.h:56
float moonIntensity
Disc radiance; its halo follows.
Definition environment.h:54
static constexpr float TWILIGHT_DEGREES
Degrees either side of the horizon across which day hands over to night.
Definition environment.h:68
glm::vec3 radiance
Skyglow the scene is lit by, so night is dark, not black.
Definition environment.h:51
float moonTilt
Degrees off directly opposite the sun.
Definition environment.h:52
float starIntensity
0 disables; the default clears the bloom threshold.
Definition environment.h:55
float moonAngularRadius
Radians.
Definition environment.h:53
Where a celestial body sits, in the authored angle form.
Definition environment.h:119
float elevation
Degrees above the horizon. Negative is below it.
Definition environment.h:120
float azimuth
Degrees around the horizon, from +Z toward +X.
Definition environment.h:121
Sky and image-based lighting: what the world is lit by and set against.
Definition environment.h:15
float lightIntensity
At midday.
Definition environment.h:37
float sunAzimuth
Degrees around the horizon, from +Z toward +X.
Definition environment.h:32
float rayleigh
Blue-sky scattering scale.
Definition environment.h:24
float sunIntensity
Atmosphere sun radiance scale.
Definition environment.h:23
glm::vec3 lightColor
With the sun overhead.
Definition environment.h:36
static constexpr float MAX_MIE_G
At 1 the phase function divides zero by zero.
Definition environment.h:40
float sunDiscIntensity
Added over the atmospheric glow.
Definition environment.h:28
float mie
Haze / sun glow scattering scale.
Definition environment.h:25
std::string hdrPath
Equirect HDR baked into IBL + skybox; empty = none.
Definition environment.h:16
float sunElevation
Degrees above the horizon. Negative is night.
Definition environment.h:31
float sunAngularRadius
Radians; ~0.0047 is life-size.
Definition environment.h:27
float intensity
Indirect-lighting + skybox brightness.
Definition environment.h:17
float mieG
Phase asymmetry, 0..MAX_MIE_G; higher = tighter glow.
Definition environment.h:26
bool showSkybox
The IBL still lights the scene when off.
Definition environment.h:18