summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorJFonS <joan.fonssanchez@gmail.com>2019-02-06 16:00:22 +0100
committerJFonS <joan.fonssanchez@gmail.com>2019-02-06 16:00:22 +0100
commita7a21bd9fe72052e117a71f9934b9acae038d962 (patch)
tree2860b65fa009793aa36042eb8f4ec9c4a49bb510 /scene/2d
parent25027d60f7fb665d2d82f964f1c4f7927fe15cc7 (diff)
Fix particles animation on GLES2
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/canvas_item.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index dced688899..41cee7335e 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -134,7 +134,7 @@ void CanvasItemMaterial::_update_shader() {
code += "\tint total_frames = particles_anim_h_frames * particles_anim_v_frames;\n";
code += "\tint frame = int(float(total_frames) * INSTANCE_CUSTOM.z);\n";
code += "\tif (particles_anim_loop) {\n";
- code += "\t\tframe = abs(frame) % total_frames;\n";
+ code += "\t\tframe = int(abs(frame) % total_frames);\n";
code += "\t} else {\n";
code += "\t\tframe = clamp(frame, 0, total_frames - 1);\n";
code += "\t}\n";