summaryrefslogtreecommitdiff
path: root/gfx/lightDirection.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-10-24 03:10:08 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-10-24 03:10:10 +0100
commit0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701 (patch)
tree987c196297c9be79dfc78875952965c4af2ebc28 /gfx/lightDirection.h
parentMerge branch 'billboard-shadows' (diff)
downloadilt-0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701.tar.bz2
ilt-0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701.tar.xz
ilt-0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701.zip
Improve sun illumination based on angular size and astronomical twilight
Diffstat (limited to 'gfx/lightDirection.h')
-rw-r--r--gfx/lightDirection.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/gfx/lightDirection.h b/gfx/lightDirection.h
index f1e1cc4..789830b 100644
--- a/gfx/lightDirection.h
+++ b/gfx/lightDirection.h
@@ -20,13 +20,20 @@ public:
}
[[nodiscard]] float
- vertical() const noexcept
+ ambient() const noexcept
{
- return vert;
+ return amb;
+ }
+
+ [[nodiscard]] float
+ directional() const noexcept
+ {
+ return dir;
}
private:
Direction2D pos;
Direction3D vec;
- float vert;
+ float amb;
+ float dir;
};