From 035fece0e75fc5d9de44c19e749af6a6a0688cab Mon Sep 17 00:00:00 2001 From: Marcus Elg Date: Fri, 25 Aug 2023 09:59:05 +0200 Subject: [PATCH] Fix GPUParticle2D offset stutter (cherry picked from commit 936fd8db3829921ec346461567f235ead4a79582) --- scene/resources/particle_process_material.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/resources/particle_process_material.cpp b/scene/resources/particle_process_material.cpp index 1c7ea99ef5e..476ef67a57e 100644 --- a/scene/resources/particle_process_material.cpp +++ b/scene/resources/particle_process_material.cpp @@ -761,7 +761,7 @@ void ParticleProcessMaterial::_update_shader() { code += " float base_angle = (tex_angle) * mix(initial_angle_min, initial_angle_max, angle_rand);\n"; code += " base_angle += CUSTOM.y * LIFETIME * (tex_angular_velocity) * mix(angular_velocity_min,angular_velocity_max, rand_from_seed(alt_seed));\n"; code += " CUSTOM.x = base_angle * degree_to_rad;\n"; // angle - code += " CUSTOM.z = (tex_anim_offset) * mix(anim_offset_min, anim_offset_max, rand_from_seed(alt_seed)) + tv * tex_anim_speed * mix(anim_speed_min, anim_speed_max, rand_from_seed(alt_seed));\n"; // angle + code += " CUSTOM.z = (tex_anim_offset) * mix(anim_offset_min, anim_offset_max, anim_offset_rand) + tv * tex_anim_speed * mix(anim_speed_min, anim_speed_max, rand_from_seed(alt_seed));\n"; // angle // apply color // apply hue rotation