8#include "core/reflect.h"
9#include "ecs/component/render/light.h"
11namespace Vkm::Engine {
24 bool procedural =
true;
66 glm::vec3 moonlightColor = {0.55f, 0.65f, 1.0f};
67 float moonlightIntensity = 0.12f;
87 glm::vec3
albedo = {0.8f, 0.85f, 1.0f};
148 return {sky.sunElevation, sky.sunAzimuth};
159 return {-sky.sunElevation + night.moonTilt, sky.sunAzimuth + 180.0f};
204 VKM_F(sunDiscIntensity)
205 VKM_F(aerialPerspective)
209 VKM_F(lightIntensity)
212VKM_REFLECT_BEGIN(::Vkm::Engine::NightSkySettings)
215 VKM_F(moonAngularRadius)
219 VKM_F(moonlightColor)
220 VKM_F(moonlightIntensity)
223VKM_REFLECT_BEGIN(::Vkm::Engine::FogSettings)
236VKM_REFLECT_BEGIN(::Vkm::Engine::Environment)
The scene's lighting environment: sky, night sky and fog.
Definition environment.h:137
SkyAngles moonAngles() const
Where the moon sits: opposite the sun, tilted off that axis.
Definition environment.h:158
SkyAngles sunAngles() const
Where the sun sits, straight off the authored fields.
Definition environment.h:147
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:179
glm::vec3 sunDirection() const
Direction TO the sun from the authored angles.
Definition environment.h:169
Froxel volumetric fog: a compute pass scatters the scene lights through a height-falloff medium and a...
Definition environment.h:81
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:109
glm::vec3 albedo
Scattering tint.
Definition environment.h:87
uint32_t resolutionX
Screen tiles; higher = sharper shafts.
Definition environment.h:88
uint32_t resolutionY
Screen tiles.
Definition environment.h:89
float maxDistance
How far from the eye the slices reach, in metres.
Definition environment.h:97
float density
Base extinction at height.
Definition environment.h:83
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:103
static constexpr uint32_t MIN_FROXELS
Per axis.
Definition environment.h:102
float heightFalloff
Density e-folding per world unit above height.
Definition environment.h:85
float height
World Y where the medium is densest.
Definition environment.h:84
uint32_t resolutionZ
Exponential slices.
Definition environment.h:90
float anisotropy
Henyey-Greenstein g, within MAX_ANISOTROPY.
Definition environment.h:86
static constexpr float MAX_ANISOTROPY
At +-1 the phase function divides zero by zero.
Definition environment.h:100
Component representing a light source in the scene.
Definition light.h:36
float shadowDistance
Directional only: world distance the cascades cover.
Definition light.h:69
What the sky is once the sun is down.
Definition environment.h:55
float starDensity
Higher packs more, smaller stars.
Definition environment.h:62
float moonIntensity
Disc radiance; its halo follows.
Definition environment.h:60
static constexpr float TWILIGHT_DEGREES
Degrees either side of the horizon across which day hands over to night.
Definition environment.h:74
glm::vec3 radiance
Skyglow the scene is lit by, so night is dark, not black.
Definition environment.h:57
float moonTilt
Degrees off directly opposite the sun.
Definition environment.h:58
float starIntensity
0 disables; the default clears the bloom threshold.
Definition environment.h:61
float moonAngularRadius
Radians.
Definition environment.h:59
Where a celestial body sits, in the authored angle form.
Definition environment.h:126
float elevation
Degrees above the horizon. Negative is below it.
Definition environment.h:127
float azimuth
Degrees around the horizon, from +Z toward +X.
Definition environment.h:128
Sky and image-based lighting: what the world is lit by and set against.
Definition environment.h:16
float lightIntensity
Illuminance with the sun overhead.
Definition environment.h:43
float sunAzimuth
Degrees around the horizon, from +Z toward +X.
Definition environment.h:37
float aerialPerspective
Definition environment.h:33
float rayleigh
Blue-sky scattering scale.
Definition environment.h:25
glm::vec3 lightColor
With the sun overhead.
Definition environment.h:42
static constexpr float MAX_MIE_G
At 1 the phase function divides zero by zero.
Definition environment.h:46
float sunDiscIntensity
Definition environment.h:30
float mie
Haze / sun glow scattering scale; 1 is pristine air.
Definition environment.h:26
std::string hdrPath
Equirect HDR baked into IBL + skybox; empty = none.
Definition environment.h:17
float sunElevation
Degrees above the horizon. Negative is night.
Definition environment.h:36
float intensity
Indirect-lighting + skybox brightness.
Definition environment.h:18
float mieG
Definition environment.h:27
bool showSkybox
The IBL still lights the scene when off.
Definition environment.h:19