Skip to content

Commit

Permalink
Fix missing ImageTexture::create_from_image call in GPUParticles3DEdi…
Browse files Browse the repository at this point in the history
…tor::_generate_emission_points

Images for emission point texture and normals were created, but not
transferred to textures.

fix godotengine#43643
  • Loading branch information
W4RH4WK committed Mar 4, 2021
1 parent 4c10d31 commit fab2158
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion editor/plugins/gpu_particles_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ void GPUParticles3DEditor::edit(GPUParticles3D *p_particles) {
}

void GPUParticles3DEditor::_generate_emission_points() {
/// hacer codigo aca
Vector<Vector3> points;
Vector<Vector3> normals;

Expand Down Expand Up @@ -360,6 +359,7 @@ void GPUParticles3DEditor::_generate_emission_points() {

Ref<ImageTexture> tex;
tex.instance();
tex->create_from_image(image);

Ref<ParticlesMaterial> material = node->get_process_material();
ERR_FAIL_COND(material.is_null());
Expand Down Expand Up @@ -388,6 +388,7 @@ void GPUParticles3DEditor::_generate_emission_points() {

Ref<ImageTexture> tex2;
tex2.instance();
tex2->create_from_image(image2);

material->set_emission_normal_texture(tex2);
} else {
Expand Down

0 comments on commit fab2158

Please sign in to comment.