- Home /
Graphics Problems on iOS 4.x
Hi All
I've been developing a game on iOS 5.1, everything works as expected. However, when I run the exact same ipa on a device with iOS 4.x installed there are major issues with the graphics. It looks like some elements of the scene are being projected onto the ground plane instead of rendering properly within the scene. It's hard to determine exactly what's happening because I can't see the draw call pipeline on iOS 4.x. Looking at the warnings/errors in the Xcode GPU analytics, I can see there are loads of "Use of Unlinked Program" errors (52,000 of them in the first 10 seconds of boot) and a fair few "Draw Call Exceeded Element Array Buffer Bounds" errors (7,000 in the same period). On iOS 5.x I don't get errors for unlinked programs but I do still get the element array buffer bounds one thrown up to a much lesser extent (1,000 in roughly the same period). I'm just wondering if anybody else has encountered this? If I swap to an orthographic camera it renders everything consistently between the iOS versions (i.e. iOS version doesn't affect what gets displayed). Seems very strange that the same device with an older iOS would break the graphics....Note, I'm using Unity Pro 3.5.3, targeting iOS 4.1 with the latest SDK 5.1 to build the app.
Cheers Alan.
Answer by welsh · Jul 19, 2012 at 10:03 AM
Hi All
OK I found the problem, here's an outline in-case anybody else encounters it;
For reasons I am unable to explain, iOS 4.x cannot handle "fixed" element types in the shader parameters. This may be limited to the fragment shader inputs (I can't be sure as I changed fragment after vertex and it worked). I've no idea how or why iOS 5.x is able to deal with them when it is utilizing the same GPU but changing them from "fixed" or "fixed4" etc. to their "half" equivalents fixed the issue instantly.
Cheers Alan.
Answer by welsh · Jul 19, 2012 at 10:03 AM
Also note that changing the element type from "fixed" to "half" has noticeably hurt frame rate on lower spec devices [sigh].
Your answer
Follow this Question
Related Questions
Multiple cameras not working correctly on iPad Air 0 Answers
How to make skybox transparent. 2 Answers
camera move(slide) continiously on IOS 1 Answer
Sun-shaft camera glitch 0 Answers
Camera / Graphic bug with 2D Sprites [Please help me solve this] 4 Answers