summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-08 23:38:06 +0100
committerGitHub <noreply@github.com>2022-01-08 23:38:06 +0100
commit32abe36cceacf7221fde09f84e0610c7d4741640 (patch)
tree6a48950aef7472d1baf57dc50403b20ef12fc1c3 /scene
parente03714f66c1047024de5adc5b8f42f3edc8abcb9 (diff)
parentc9f5d88f3a152be03450af364075420e10dc1f18 (diff)
Merge pull request #56617 from AnilBK/use_fill
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;
}