summaryrefslogtreecommitdiffhomepage
path: root/shaders
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-04-08 17:05:16 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-04-08 19:40:10 +0200
commit064379bd0bd929f6b87c50f740e9a783b4d9e054 (patch)
treeb717428ace85bde06fff19ac96b11d95787b538f /shaders
parent4eefaf4e12199c071d2e6ee0d99b46d2e1d45557 (diff)
a
Diffstat (limited to 'shaders')
-rw-r--r--shaders/lightmap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/shaders/lightmap.cpp b/shaders/lightmap.cpp
index bca81c6a..b3cd1e60 100644
--- a/shaders/lightmap.cpp
+++ b/shaders/lightmap.cpp
@@ -227,9 +227,10 @@ void lightmap_shader::add_light(Vector2 neighbor_offset, const light_s& light)
constexpr auto tile_size = TILE_SIZE2.sum()/2;
float range;
+ fm_assert(light.falloff < light_falloff::COUNT);
switch (light.falloff)
{
- default:
+ case light_falloff::COUNT: std::unreachable();
case light_falloff::constant:
range = TILE_MAX_DIM;
break;