Page 1 of 1

Space Patrol example and iPad Air

Posted: Mon Feb 03, 2014 11:55 am
by rohirm
Hi,

This is not directly a Chipmunk question.. When I run the Space Patrol example with my iPad 3 it runs just fine, but when running on iPad Air the background parallax is very jumpy. It shakes around. I use the similar parallax in my game and I haven't figured out what causes it. Any ideas?

Thanks!

Re: Space Patrol example and iPad Air

Posted: Mon Feb 03, 2014 2:06 pm
by slembcke
Probably a shader precision issue. I just picked up a retina mini a couple days ago and a bunch of my old shaders are broken. I'm guessing that something in the new GPU is computed with less precision than before.

Do you know about the ES frame capture feature of Xcode? It makes it pretty easy to troubleshoot shaders. You can edit them on the fly and poke around with the shader easily.

Re: Space Patrol example and iPad Air

Posted: Tue Feb 04, 2014 3:18 am
by rohirm
Didn't know that. Thanks for the hint!

That was the problem. I had to change the precision of the parallax shader variables from mediump to highp. Now it runs smoothly.