summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-12-02 10:14:26 +0100
committerGitHub <noreply@github.com>2021-12-02 10:14:26 +0100
commitbb3f0a9d583f2235c9982a5028f3885bc7c1d6a0 (patch)
tree5bcd822f580935b4d963765849ad06d28befa098 /scene/resources
parent1398436ab882416379e785b993c6c7395e218a34 (diff)
parent459e2a4b6f45b19f50e8a493e12e0f442a14a826 (diff)
Merge pull request #55271 from RPicster/particles-texture-animation-speed
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/particles_material.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp
index e77f5a0be7..5ceb90d511 100644
--- a/scene/resources/particles_material.cpp
+++ b/scene/resources/particles_material.cpp
@@ -584,7 +584,7 @@ void ParticlesMaterial::_update_shader() {
code += " float base_angle = (tex_angle) * mix(initial_angle_min, initial_angle_max, rand_from_seed(alt_seed));\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)) + CUSTOM.y * 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, rand_from_seed(alt_seed)) + tv * tex_anim_speed * mix(anim_speed_min, anim_speed_max, rand_from_seed(alt_seed));\n"; // angle
// apply color
// apply hue rotation