- Home /
iPhone Optimization - using 1024x1024 textures for background
Hi everyone, I'm on the optimization process of an iPhone game I'm working on. We finished the gameplay/assets integration. Making heaps of profiles to check where the bottlenecks were, I have to say that I'm a bit lost there, I don't really know how I can read the profile log, here is an example :
iPhone Unity internal profiler stats:
cpu-player> min: 4.3 max: 23.9 avg: 6.5
cpu-ogles-drv> min: 0.8 max: 10.9 avg: 1.5
cpu-waits-gpu> min: 0.5 max: 46.5 avg: 14.8
msaa-resolve> min: 0.0 max: 0.0 avg: 0.0
frametime> min: 7.7 max: 63.6 avg: 26.4
draw-call #> min: 12 max: 13 avg: 12 | batched: 3
tris #> min: 52 max: 54 avg: 53 | batched: 20
verts #> min: 112 max: 116 avg: 114 | batched: 48
player-detail> physx: 0.1 animation: 0.0 culling 0.0 skinning: 0.0 batching: 0.0 render: -12.3 fixed-update-count: 0 .. 2
mono-scripts> update: 0.8 fixedUpdate: 0.0 coroutines: 0.0
mono-memory> used heap: 409600 allocated heap: 479232 max number of collections: 0 collection total duration: 0.0
What I see is that I have lots of time waits-gpu. Actually, what confuses me is the huge gap between min and max values. How can I iterate to find what causes the cpu to wait for gpu an average of 14ms to max 46ms ? The draw call count and nb of verts looks correct from what I've read. The only hint I have for the moment is on the textures we're using. But as don't know a lot about 3d programming, I'm not sure of what is a potential problem and what is not. In the game, we have pixel art backgrounds that are not tilable, they have to be full-screen textures. We also have parallax and so use at most 3 of these textures at the same time on screen. They use transparency and from what I've read, it's not helping. Plus, to have clean textures in Unity, we ended having to make them square of two. Then to avoid stretching of the image, we are using planes that are scaled to that the textures fills them entirely without having to stretch. There may be another way of doing pixel perfect but everything else we've tried went ugly. One thing I would like to know is for example if rendering 4 big quads (which would represent for example 256*256 textures) is better in terms of performance than one big quad of 512*512 ? Then, should I try using batching, even if atlasing such big textures will end up either with 2048*2048 textures or having just 3 backgrounds in one texture ?
Thanks in advance and don't hesitate if you feel the need for more information
Your answer
![](https://koobas.hobune.stream/wayback/20220612225151im_/https://answers.unity.com/themes/thub/images/avi.jpg)