diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-24 03:10:08 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-24 03:10:10 +0100 |
commit | 0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701 (patch) | |
tree | 987c196297c9be79dfc78875952965c4af2ebc28 /game/environment.cpp | |
parent | Merge branch 'billboard-shadows' (diff) | |
download | ilt-0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701.tar.bz2 ilt-0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701.tar.xz ilt-0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701.zip |
Improve sun illumination based on angular size and astronomical twilight
Diffstat (limited to 'game/environment.cpp')
-rw-r--r-- | game/environment.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/game/environment.cpp b/game/environment.cpp index 5aa1f09..acb4f21 100644 --- a/game/environment.cpp +++ b/game/environment.cpp @@ -18,8 +18,8 @@ Environment::render(const SceneRenderer & renderer, const SceneProvider & scene) constexpr RGB relativeAmbient {0.3F, 0.3F, 0.4F}, relativeDirectional {0.6F, 0.6F, 0.5F}; const LightDirection sunPos = getSunPos({}, worldTime); - const auto ambient = baseAmbient + relativeAmbient * sunPos.vertical(); - const auto directional = baseDirectional + relativeDirectional * sunPos.vertical(); + const auto ambient = baseAmbient + relativeAmbient * sunPos.ambient(); + const auto directional = baseDirectional + relativeDirectional * sunPos.directional(); renderer.setAmbientLight(ambient); renderer.setDirectionalLight(directional, sunPos, scene); |