Merge pull request #33431 from Kaonnull/bugParticles2D_2

Fixed the particles2D prematurely animation ending
This commit is contained in:
Rémi Verschelde 2019-11-09 07:40:07 +01:00 committed by GitHub
commit 60d4909048
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {