Merge pull request #53036 from CaptainProton42/fix-gpuparticles3d-emission-points-from-node

This commit is contained in:
Rémi Verschelde 2021-09-25 00:06:55 +02:00 committed by GitHub
commit d395dbae26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -362,6 +362,7 @@ void GPUParticles3DEditor::_generate_emission_points() {
Ref<ImageTexture> tex; Ref<ImageTexture> tex;
tex.instantiate(); tex.instantiate();
tex->create_from_image(image);
Ref<ParticlesMaterial> material = node->get_process_material(); Ref<ParticlesMaterial> material = node->get_process_material();
ERR_FAIL_COND(material.is_null()); ERR_FAIL_COND(material.is_null());
@ -390,6 +391,7 @@ void GPUParticles3DEditor::_generate_emission_points() {
Ref<ImageTexture> tex2; Ref<ImageTexture> tex2;
tex2.instantiate(); tex2.instantiate();
tex2->create_from_image(image2);
material->set_emission_normal_texture(tex2); material->set_emission_normal_texture(tex2);
} else { } else {