summaryrefslogtreecommitdiff
path: root/gfx/gl/shadowMapper.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-15 01:29:24 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-15 01:29:24 +0000
commit685b33980cc7a346574b24732464f0cbe3115a1f (patch)
tree048db87ad645f54285f0880d20b8acf81f65fea9 /gfx/gl/shadowMapper.cpp
parentSend position and rotation matrix to GPU separately (diff)
downloadilt-685b33980cc7a346574b24732464f0cbe3115a1f.tar.bz2
ilt-685b33980cc7a346574b24732464f0cbe3115a1f.tar.xz
ilt-685b33980cc7a346574b24732464f0cbe3115a1f.zip
Switch to millimeters for spatial units
Mostly a case of changing far too many magic numbers, something else to fix I guess. I probably missed something. Also there's some hackery when loading 3D models, which are still assumed to be in metres.
Diffstat (limited to 'gfx/gl/shadowMapper.cpp')
-rw-r--r--gfx/gl/shadowMapper.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp
index e4ee47a..190f20e 100644
--- a/gfx/gl/shadowMapper.cpp
+++ b/gfx/gl/shadowMapper.cpp
@@ -80,11 +80,11 @@ constexpr std::array<std::array<TextureRelRegion, ShadowMapper::SHADOW_BANDS>, S
}},
}};
constexpr std::array<float, ShadowMapper::SHADOW_BANDS + 1> shadowBands {
- 1.F,
- 250.F,
- 750.F,
- 2500.F,
- 10000.F,
+ 1000.F,
+ 250000.F,
+ 750000.F,
+ 2500000.F,
+ 10000000.F,
};
static_assert(viewports.size() == shadowMapRegions.size());
static_assert(shadowBands.size() == shadowMapRegions.size() + 1);