Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-02-06 19:02:10 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-02-06 19:02:10 +0300
commite654975b1ebd9c3e985a104701f7de0a8ee21731 (patch)
tree54c908650f7e6af09c3da1c5e5b1d93caa712a16
parent74a0a8518145140124579ada728a8f2cbaafbf91 (diff)
EEVEE: Fix assert caused by division by 0
-rw-r--r--source/blender/draw/engines/eevee/eevee_light.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_light.cc b/source/blender/draw/engines/eevee/eevee_light.cc
index 652b7946fc1..56e8525c246 100644
--- a/source/blender/draw/engines/eevee/eevee_light.cc
+++ b/source/blender/draw/engines/eevee/eevee_light.cc
@@ -431,7 +431,7 @@ void LightModule::set_view(const DRWView *view, const int2 extent, bool enable_s
culling_data.tile_size = tile_size;
culling_data.tile_x_len = tiles_extent.x;
culling_data.tile_y_len = tiles_extent.y;
- culling_data.tile_to_uv_fac = tile_size / float2(UNPACK2(extent));
+ culling_data.tile_to_uv_fac = (!no_lights) ? tile_size / float2(extent) : float2(0.0f);
culling_data.enable_specular = enable_specular;
culling_data.items_count = no_lights ? 0 : light_refs_.size();