summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-03-11 00:59:34 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-03-11 01:13:59 +0000
commitd0ea1598abdb55c98ca8daea857f6fca77119928 (patch)
tree57bf784f00554b11197363d67c3750c92eabd61f
parentCull terrain meshes from render that don't cast a shadow into the frustum (diff)
downloadilt-d0ea1598abdb55c98ca8daea857f6fca77119928.tar.bz2
ilt-d0ea1598abdb55c98ca8daea857f6fca77119928.tar.xz
ilt-d0ea1598abdb55c98ca8daea857f6fca77119928.zip
Rebalance shadow band distribution
Extends the initial band from around 34m to around 100m.
-rw-r--r--gfx/gl/shadowMapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp
index 28ef0ae..6525f76 100644
--- a/gfx/gl/shadowMapper.cpp
+++ b/gfx/gl/shadowMapper.cpp
@@ -56,7 +56,7 @@ constexpr auto shadowBands
= []<GlobalDistance... ints>(const float scaleFactor, std::integer_sequence<GlobalDistance, ints...>) {
const auto base = 10'000'000 / pow(scaleFactor, sizeof...(ints) - 1);
return std::array {1, static_cast<GlobalDistance>((base * pow(scaleFactor, ints)))...};
- }(6.6F, std::make_integer_sequence<GlobalDistance, ShadowMapper::SHADOW_BANDS>());
+ }(4.6F, std::make_integer_sequence<GlobalDistance, ShadowMapper::SHADOW_BANDS>());
static_assert(shadowBands.front() == 1);
static_assert(shadowBands.back() == 10'000'000);