Home Unity

iOS performance Issues - RenderForwardAlpha.Render

mod
Im having performance issues with a game Im working on. In the profiler, RenderForwardAlpha.Render is taking up the most. Its almost always above 0.4 time ms. Far more than any other aspect of the game. Does anyone know what that is, or what affects it? Would it be my UI? Im using NGUI, which is suppose to be faster than Unity's built in stuff.

Unity 3.5, btw

Replies

  • Guriamo
    Offline / Send Message
    Guriamo polycounter lvl 17
    are you using alpha blend or alpha cutout?

    on ios alpha blend is a lot faster than cutout.
  • slipsius
    Bah, ya i was profiling on the pc instead of the iphone. its not the alpha render thats screwing up FPS. its Device.present. at a 30+ ms...

    Still not sure why. I have vsync turned off.
  • monster
    Offline / Send Message
    monster polycounter
    Device.Present is basically the video card of the iPhone. Camera.Render is only the CPU preparing things for the video card.

    That said I've had some pretty complex scenes but device.present never went above 1.0 for more than a frame.

    My guess is that you've got too many polys, shadows, non-mobile shaders, and alpha blending. iOS devices are not very powerful and exteme optimizations are necessary.
  • monster
    Offline / Send Message
    monster polycounter
    BTW, vsync is a good thing on the iPhone. It limits the video rendering to 30 FPS.
  • Farfarer
    I'm not convinced the vsync settings actually do anything on non-desktop platforms, by the way.

    At least on my android and iOS devices, the framerate never goes above 60 and 30 respectively.
  • slipsius
    Figured it out. So, in xCode, I turned on the profiler, and my cpu-wait-gpu was super high, which meant I was GPU bound. This means it had something to do with graphics. So I went through and looked at all my shaders and particles and draw cells. There were a couple of particles that were made early on by others that had a crap ton of draw cells, and I had some alpha that didn't need to be there. A good tip for particles on iphones is to use a black in your texture to be used as alpha, instead of actual alpha. Then in your shader, you set it to additive. This makes all the black effectively become alpha. Unfortunately, it doesnt work for UI, since it makes things kind of glow, but it sure works for particles.

    Frame rate has increased ten fold
Sign In or Register to comment.