Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Help on Lower FPS in the Iphone 4

Discussion in 'iOS and tvOS' started by gusvqueiroz, Mar 13, 2012.

  1. gusvqueiroz

    gusvqueiroz

    Joined:
    Mar 13, 2012
    Posts:
    4
    Hi Guys,

    I need some help on getting the FPS of a 3d game I am making for iOS based devices. It is working smoothly on the iPad 2 and iphone 4s, but I am getting very low FPS in certain areas during the game. Basically were there is lots of transparent objects and by playing audioclips. Now it is going from 27 (max) to 12 fps in certain areas.

    Here is a print-screen of the profiler and the statistics.


    Can anyone give me some directions on how I can squeeze the extra FPS?

    Kind regards,

    Gustavo
     
  2. Dodzilla

    Dodzilla

    Joined:
    Nov 19, 2010
    Posts:
    14
    Lots of transparency is always going to be bad for performance, try using a faster shader for the transparent objects if you can (like vertex lit). Or don't have so many transparent objects :)
     
  3. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    if you can, and it is worth do it in some critical case , it's try to just cut around your transparent mesh in zone they overlay like crazy..that will really help, and combined with fast shader then for transparency you should be good.

    I had similar issue on a book app, with a lot of drawing overlay all over the place , plus big sized texture, which was like 10 ~ 15 fps on ipad1...after having ( manually ) cut out all those board, which was a bit of work yeah + some other opti , I got back on a 58 ~ 60 fps.

    lowering the amount of transparency that overlay by cutting your mesh in my opinion will be always a win win and you don't even need to be a shader guru ^^...but that's not applicable in all situation.
     
    Last edited: Mar 14, 2012
  4. gusvqueiroz

    gusvqueiroz

    Joined:
    Mar 13, 2012
    Posts:
    4
    Hi Guys,

    Thanks for the replies!

    Well I tried taking of the transparent shaders, but still the fps is very low. The drawcalls are not that high...

    I am looking at the Statistics and looks like all the animations are there... I have them on Culling type Based on Clip Bound and they continue to show in the statistics... Any idea why that is happening?

    Also It looks like that, as I play a sound using AudioSource.PlayClipAtPoint(sound), the fps goes down...
     
  5. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Experiment with different compression settings for audio. Sometimes compression can impact CPU performance
     
  6. gusvqueiroz

    gusvqueiroz

    Joined:
    Mar 13, 2012
    Posts:
    4
    Hey Guys,

    I exported the sounds to .wav and it brought up the fps, that in conjunction with a ultra-simple transparent shader did the job.

    Thanks!!!!!