summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorAnilforextra <anilforextra@gmail.com>2022-01-08 17:43:15 +0545
committerAnilforextra <anilforextra@gmail.com>2022-01-08 17:43:15 +0545
commitc9f5d88f3a152be03450af364075420e10dc1f18 (patch)
tree5712375f0d445caa60d5199aa98c17e01cbf2cbf /scene
parentc09c4e0154160f74f1d9889f74cd3e411ba7a08c (diff)
Use fill() to fill an entire image instead of setting pixels individually.
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/lightmap_gi.cpp6
1 files changed, 1 insertions, 5 deletions
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;
}