- Home /
Frame Rate Problem
I am new in unity3d. I am making a game but my game is not working on iPhone 4 properly . It can not maintain desired frame-rate. I have checked with the in-built profiler. Every thing is fine except the "Rendering" graph. The rendering graph (with green color) is crossing 30 FPS that is why I think the graphics I am using into my game are too much expensive and causes a low frame-rate .
I am using simple shaders. I have made common materials for many objects So that they share same material (to reduce the draw calls) . Some draw-calls are being batched (about 60 % of draw calls are being batched). But still the game is not working on iPhone 4 with desired frame but working on iPad as expected
Can anybody give me the maximum numbers of "Draw calls" , "no of verts or tris" I can use for iPhone 4.
Thanks in advance. :-)
pretty positive draw calls maximum is influenced by the complexity of what your drawing so just so your aware any answer you would receive would at best be an approximation.
Unity docs does have optimizing mobile stuff though.
you can also delve into the rendering information in more detail to see what exactly is causing the hang up.
It could be a texture, or it could be for example debug.drawray or debug.drawline.
debug draws calls are quite intensive actually and until you make a non debug build (or comment out remove the relevant code) you'll see a framerate hit.
How many draw calls are you getting? A good way to find out if your program is draw call or graphics limited, is changing the screen size and see how much the framerate is influenced.
Thanks for response guys. I m getting 50 draw calls on average.I can change the screen size on computer only (I guess).And on the computer my game is running properly. The problem is on iPhone 4.
Answer by ankush_Kushwaha · Jan 12, 2014 at 07:43 AM
You will be needing to reduce your drawcalls, make shader optimisation and trying to reduce number of verts for object.
Drawcall Optimisation : Drawcall depends upon the number of material (texture) used and number of meshes used in a scene. You can reduce your number of material by using Atlas ( by combining many textures in one ). Number of meshes can be reduced by combining the meshes of small objects.
Shader: Try to use simple shader instead of complex one. Use "mobile shader" as they are made to improve the performance. Drawcalls, shader and verts are the keys on which graphics performance depends upon.
For more you can see unity official site
Your answer
Follow this Question
Related Questions
Low FPS when against a wall? 1 Answer
Fast line rendering in 2D/3D 0 Answers
Why is the CPU usage so high? 1 Answer