2D Toolkit Forum

2D Toolkit => Support => Topic started by: theremin on June 08, 2012, 11:32:23 pm

Title: 2D Toolkit shaders: poor for performance and battery life on iOS?
Post by: theremin on June 08, 2012, 11:32:23 pm
I was asking an unrelated question on the Unity Answers site, and I posted a snippet of the 2D Toolkit "BlendVertexColor" shader, and one of the commenters said the following:

Quote
You should tell whoever made 2D Toolkit that fixed function shaders aren't appropriate for mobile devices anymore! Fixed function emulation is a poor choice for mobile devices; it eats performance and battery.

http://gamedev.stackexchange.com/questions/16423/why-is-programmable-pipeline-glsl-faster-than-fixed-pipeline

I'm a shader novice, so I'm not sure exactly what he means by this. Can anyone explain what this means? What would be a better alternative for a shader?
Title: Re: 2D Toolkit shaders: poor for performance and battery life on iOS?
Post by: unikronsoftware on June 09, 2012, 07:30:08 am
I've not been profiling the shaders for a while now, and this could may well be true now - the original shaders were written targetting arm6 (gles1.1) which didn't support any other forms of shaders. IIRC, when I profiled on iPhone4, I don't think there was any noticable difference between these and GLSL shaders, and the shaders were ROP (blend) bound rather than instruction bound, so any GLSL shaders would have made absolutely no difference there.

But that was a long time ago - I'll look at these next time I get a chance. I would personally prefer to have GLSL shaders instead of this fixed function monstrosity :)
Title: Re: 2D Toolkit shaders: poor for performance and battery life on iOS?
Post by: theremin on June 09, 2012, 07:40:13 pm
Cool, that sounds good. Thanks for the response! :)