From c9f5d88f3a152be03450af364075420e10dc1f18 Mon Sep 17 00:00:00 2001 From: Anilforextra Date: Sat, 8 Jan 2022 17:43:15 +0545 Subject: Use fill() to fill an entire image instead of setting pixels individually. --- scene/3d/lightmap_gi.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'scene') diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index d97d33117a..715c421632 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -942,11 +942,7 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa c.r *= environment_custom_energy; c.g *= environment_custom_energy; c.b *= environment_custom_energy; - for (int i = 0; i < 128; i++) { - for (int j = 0; j < 64; j++) { - environment_image->set_pixel(i, j, c); - } - } + environment_image->fill(c); } break; } -- cgit v1.2.3