summaryrefslogtreecommitdiff
path: root/modules/noise
diff options
context:
space:
mode:
Diffstat (limited to 'modules/noise')
-rw-r--r--modules/noise/noise_texture_2d.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/noise/noise_texture_2d.cpp b/modules/noise/noise_texture_2d.cpp
index 23d60c4866..8c785d7591 100644
--- a/modules/noise/noise_texture_2d.cpp
+++ b/modules/noise/noise_texture_2d.cpp
@@ -176,9 +176,7 @@ Ref<Image> NoiseTexture2D::_modulate_with_gradient(Ref<Image> p_image, Ref<Gradi
int width = p_image->get_width();
int height = p_image->get_height();
- Ref<Image> new_image;
- new_image.instantiate();
- new_image->create(width, height, false, Image::FORMAT_RGBA8);
+ Ref<Image> new_image = Image::create_empty(width, height, false, Image::FORMAT_RGBA8);
for (int row = 0; row < height; row++) {
for (int col = 0; col < width; col++) {