|
Hey guys, Just a quick performance question i was interested in. Whenever i've had to fade objects in and out i've always done a modification of the renderer property by assigning a new Color to it over time in a while loop (coroutine). What i was wondering is if it has a big performance hit if done to several objects on screen? I've done some testing on iPad 2/3 and some Android devices and it seems fine. Would it be better if i had a shader handle the alpha value for me? And just pass in a new value to the shader over time?
(comments are locked)
|
|
It's possible that you could make those operations faster, but I don't anticipate this would be considered a "low-hanging fruit" when it comes to optimizing performance. There are probably other issues you can improve more easily. Gotcha, thanks. Would it still be a negligible optimisation for mobile devices?
Mar 27 '12 at 11:17 PM
Default117
Mobile in general does have less juice to go around, but in my experience setting color params is still pretty quick. If you're more or less familiar with shaders, it might be worth checking out, but otherwise I probably spend some time testing whether it's a problem (say, remove the color calls and check how your performance changes).
Mar 28 '12 at 02:38 AM
rutter
(comments are locked)
|

The shader is handing the alpha value. That's what you're doing when you change renderer.material.color.
Oh ok, thanks for the clarification!