Best way to fade screen in and out...

Hi,

Previously I was using a GUITexture on a gameobject to fade in / out scenes. I have been experimenting with switching to the new UGUI to replace the old GUITextures, but I have noticed a performance hit if I have a GUILayer attached to the camera (iPhone4). If I turn the GUILayer off, since its not needed for the gui then performance seems to be good again, but I cant use the GUITexture to fade in and out…

So I thought I would use a UGUI image (material color) and use this to fade in / out scenes, but this appears to be slower than using a GUITexture. I’m sure there must be better way to fade in / out so I was wondering if anyone had any suggestions? Would a sprite be quicker or is there simpler UGUI image / material to use that would be faster?

Any help would be appreciated…

Thanks

Rich

Well the only cost is fillrate (you have to render the pixels). Using a full screen UI Image and fading the alpha should be enough. What do you mean when you say performance is bad?

Thanks for taking the time to read and reply…

Yeah, and obviously this isn’t the strongest point of the iPhone 4, however, performance wise there is a noticeable frame rate drop when using the UGUI image material color fade in comparison to a GUITexture material color fade. At the moment, I am fading the UGUI image down to 0 alpha and then disabling the image which is ok, but it seems strange to me that there appears to a be a performance drop in comparison the the GUITexture method and I was wondering if there is an alternative solution and that I’m being silly and missing something…

Thanks once again.

Rich

It’s been my experience that on iPhone 4 any fullscreen transparencies are incredibly slow and can cause noticable slow downs for the rest of the game. A game I worked on had a dark transparent block that would cover the screen during pause, when when we had a scrolling menu on the pause menu, it was incredibly bad until we darkened the screen by actually futzing with the palettes of everything to make them darker. Happened on both iPhone 4 and iPad 1.

Ok, thanks for the reply… I knew it had trouble with it, but I think I am going to have live with it since the darkening palettes would mean altering shaders to include colours (some were shaders with just textures) and from trial this impacted on performance too…

Thanks all your help though.