diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-09 07:40:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-09 07:40:07 +0100 |
commit | 60d4909048011b09b93f1483c72375fb0c46deac (patch) | |
tree | 0ebb960352d452fa02163437011617c4d615e9c0 | |
parent | 28294b1f1979e2c39423dab6767fa6b159841e7d (diff) | |
parent | 7e4ae4c503353f27168da8a0c8ae715d1b80b97a (diff) |
Merge pull request #33431 from Kaonnull/bugParticles2D_2
Fixed the particles2D prematurely animation ending
-rw-r--r-- | scene/resources/particles_material.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp index 969743f78c..c5956d9bc2 100644 --- a/scene/resources/particles_material.cpp +++ b/scene/resources/particles_material.cpp @@ -332,7 +332,7 @@ void ParticlesMaterial::_update_shader() { code += " float base_angle = (initial_angle + tex_angle) * mix(1.0, angle_rand, initial_angle_random);\n"; code += " CUSTOM.x = base_angle * degree_to_rad;\n"; // angle code += " CUSTOM.y = 0.0;\n"; // phase - code += " CUSTOM.w = LIFETIME * (1.0 - lifetime_randomness * rand_from_seed(alt_seed));\n"; + code += " CUSTOM.w = (1.0 - lifetime_randomness * rand_from_seed(alt_seed));\n"; code += " CUSTOM.z = (anim_offset + tex_anim_offset) * mix(1.0, anim_offset_rand, anim_offset_random);\n"; // animation offset (0-1) switch (emission_shape) { |