Unity3D: UGUI Benefits of applying a Material to UI Image elements -


the ui image (http://docs.unity3d.com/manual/script-image.html) object has material , source image attribute.

two questions:

  1. if i'm rendering plain square solid-color element in ui (ie background or non-rounded button) there benefit setting non-null source image? thought maybe adding white 'filler' sprite that's attached central sprite map might reduce draw calls or something, appears has no effect vs leaving sprite null.

  2. in same plain square solid-color element, there benefit using non-null material? in, default ui shaders provided unity performance value on using null setting?

1) yes, use white filler sprite in sprite atlas ui engine can easier batch draw calls together. don't expect of performance boost that, unless have lot of them.

2) yes, wrote 2 special super simple shaders: 1 invisible images (used hidden buttons) , 1 opaque images. dramatically improved performance, in test scenario 12 overlapping opaque images on ipad 3, 26ms down 4ms frame render time, massive increase 38 fps theoretical 250 fps.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -