diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-02-06 18:40:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-06 18:40:35 +0100 |
commit | 4b6327fb302cff5998bf3d3405a645d02bddb42a (patch) | |
tree | 2860b65fa009793aa36042eb8f4ec9c4a49bb510 /scene | |
parent | 25027d60f7fb665d2d82f964f1c4f7927fe15cc7 (diff) | |
parent | a7a21bd9fe72052e117a71f9934b9acae038d962 (diff) |
Merge pull request #25659 from JFonS/fix_25567
Fix particles animation on GLES2
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/canvas_item.cpp | 2 |
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"; |