diff options
author | Anilforextra <anilforextra@gmail.com> | 2022-01-08 17:43:15 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2022-01-08 17:43:15 +0545 |
commit | c9f5d88f3a152be03450af364075420e10dc1f18 (patch) | |
tree | 5712375f0d445caa60d5199aa98c17e01cbf2cbf /scene | |
parent | c09c4e0154160f74f1d9889f74cd3e411ba7a08c (diff) |
Use fill() to fill an entire image instead of setting pixels individually.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/lightmap_gi.cpp | 6 |
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; } |