Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Shaders, alpha, and speed

Discussion in 'iOS and tvOS' started by bpritchard, Jul 31, 2012.

  1. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    We're working on a rather robust project that has a large number of "layers" to it and with that comes a massive amount of fill rate as all the layers have some measure of transparency. Right now we're using the Sprite shaders provided with EZGUI and have been successful for us for some time but now that we're running more and more transparency we're seeing a significant amount of slow down on handhelds (iPads work fine). our target devices are iPhone 4 and up and iPad 2 and up.. so the specs are pretty high.. but for some reason the fill rate on the handheld devices is really low compared to the iPads.

    So i guess my question is what would you guys recommend for optimizations assuming we can't simply remove a ton of layers or comp them together in 1 image. Are there some more efficient shaders out there for transparency management? I imagine its a combination of fill against texture size (they are getting larger). We have tried using mipmaps to control texture size based on platform and have had "some" success but not improving framerate significantly on handhelds.

    Sorry if this is broad.. i can go into more detail if anyone has any questions about our setup.. but as always appreciate all the help the forums provide.

    Cheers
    Bryan
     
  2. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    How many layers is your app using ?
     
  3. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    its varies, currently we have 1 scene that has approx 10 layers of alpha sprites all sitting on top of each other. I realize thats naughty... :) but i was hoping we could have some optimizations that would help. The problem we face is that a lot of the images are LARGE, and are sitting on top of other large images that sit on a large bg.
     
  4. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Are they all separate images or are some or all on one texture
     
  5. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    they are all individual images, w/a lot of dead space. I was thinking of moving over to more dense meshes that conform closer to the actual texture which would give less pixel blending... its a bit of work but it might yield some better results since we're not pushing a lot of ploys currently.
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723