Animation shaking problem (SOLVED)

Animated sprite is shaking on iOS (Safari) and Chromebook. Why?
Source code - GitHub - aglitchman/defold-moondemo
Compiled HTML5 demo - MoonDemo 0.0

PC (Windows 10), Android (Chrome, Nexus 6)

MoonDemo_PC

Samsung Chromebook Plus (ARM CPU)

MoonDemo_Chromebook

iPhone 7 (Safari browser)

MoonDemo_iPhone7

Try modifying the shader to be high precision only?

1 Like

This isn’t a shader!?! Looks like a plain old flipbook animation (+200 images). I can’t see any descrepency in image size etc. All looks good. 200+ images might be pushing it though.

Could be actual bug, or browser limitation?

I’m saying try changing the precision of the sprite shaders to be highp. It might correct the problem due to UV coordinate precision not being high enough on these platforms possibly.

Copy builtin sprite material and shader program. Change values to highp where they are lowp. Use that on the moon sprite.

7 Likes

You are absolutely right, highp for uvs fixed the problem:

// sprite.fp
varying highp vec2 var_texcoord0;

// sprite.vp
attribute highp vec2 texcoord0;
varying highp vec2 var_texcoord0;

Thanks!

5 Likes