Fix GPUParticle3D emission point generation

`emission_point_texture` is now correctly created from an image containing the emission points.
This commit is contained in:
John Wigg 2021-09-24 23:11:10 +02:00 committed by GitHub
parent 46cc0af5c5
commit ed5f6cc351
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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