Vertices are shaking / wobbling on IPhone 6s


On an IPhone 6s, the vertices are shaking / wobbling (that means all objects are moving a little all the time) while the scene is working on a low-budget android phone and on my computer. I’m pretty sure that this is not a z-fighting problem. Keeping camera.minZ and camera.maxZ between 0.25 and 10 also doesn’t help.

It seems for me like the precision of the output vertices in the vertex shader is somehow extremely low, but then I would expect that changing minZ and maxZ would fix it. Has anyone ever seen something like this and does know how to fix this?

This is definitely a depth buffer issue. MinZ and MaxZ should fix that definitely. Can you share your scene in the PG?

Thanks for your reply (and sorry for my late reply)! I played again with the min/max-values, set them to values between 2-3 or 5-8 and there was nearly no wobbling noticeable anymore. So they really fixed it and I simply had to reduced the range more than before. I didn’t expect that the depth buffer of IPhones are so imprecise in a web browser… Is there a possibility to request a more precise depth buffer on safari? My scene currently need values from 0.2 to 5000…

Second question: Is there a possibility to change minZ and maxZ for some objects in the scene, e.g. for clouds? I tried to use clouds.onBeforeRenderObservable.add(…) and reset the values in clouds.onAfterRenderObservable.add(…), but the minZ- and maxZ-values where first applied in the next frame. Is there another solution for?

And my third question: Also with really small ranges of z-values, the wobbling stays the same on animated objects, like here:

Does anyone know why this could be?

(I would like to upload this scene to the PG, but it has grown up really big, contains lots of classes, and so on)

Nope you should have a 24bits depth buffer but old iphones are crappy when it is about safari :frowning:

Second question: This should work but you have to FORCE the camera to update its projection matrix with camera.getProjectionMatrix(true)

Third question: This is REALLY weird. Can you turn off special effects like glow and so on?

Sorry again for my late reply - had lots of other stuff to do…

All effects were disabled. But I found the cause of all the bugs: A few weeks ago, I set useHighPrecisionFloats to false in the options of the engine for optimization reasons. Because that did not affect the scene quality on computers and my own smartphone, I did not revert it. When I saw what it does on IPhones, I didn’t think about that…

By the way, my little world is online now: Unfortunately, completely in German. Anyway it is more or less a project for test purposes (and e.g. to attach it to job applications :smiley: ). Probably a friend and I will implement a little adventure and puzzle game in the next year (non-commercial, with a story, also in English, …). If we do, we will certainly tell about it in the “Demo and Projects” section :wink:


Yes please share your progress!!