diff options
Diffstat (limited to 'editor/plugins/gpu_particles_3d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/gpu_particles_3d_editor_plugin.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp index fa971679e6..5461fda58b 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp @@ -363,10 +363,7 @@ void GPUParticles3DEditor::_generate_emission_points() { } Ref<Image> image = memnew(Image(w, h, false, Image::FORMAT_RGBF, point_img)); - - Ref<ImageTexture> tex; - tex.instantiate(); - tex->create_from_image(image); + Ref<ImageTexture> tex = ImageTexture::create_from_image(image); Ref<ParticlesMaterial> material = node->get_process_material(); ERR_FAIL_COND(material.is_null()); @@ -392,12 +389,7 @@ void GPUParticles3DEditor::_generate_emission_points() { } Ref<Image> image2 = memnew(Image(w, h, false, Image::FORMAT_RGBF, point_img2)); - - Ref<ImageTexture> tex2; - tex2.instantiate(); - tex2->create_from_image(image2); - - material->set_emission_normal_texture(tex2); + material->set_emission_normal_texture(ImageTexture::create_from_image(image2)); } else { material->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_POINTS); material->set_emission_point_count(point_count); |