Adding a simple mix() destroys the framerateBtw, since you're Mr. Unity, feel free to double-check my findings. I may have missed something. Also, I suspect that the problem could be that mix() will internally always use mediump (or worse) for the computations. If I use a mediump for fogDiff in the above example, I get back to the same performance numbers I had with mix().

Apr20

comment

Adding a simple mix() destroys the framerateI would have thought even the most primitive compiler would convert d=mix(a,b,c) into d+=(b-a)*c. Oh well, you know what they say - if you want to get the job done right, you have to do it yourself. Thanks again for all your help.

Apr20

comment

Adding a simple mix() destroys the framerate@Ellis: This tool is absolutely brilliant. See the edit to my original question, I got it back to 29fps by simply changing the mix() to something else. Does mix() internally saturate, or why is it so ridiculously slow?

Adding a simple mix() destroys the framerate@Nevermind: I should let Ellis answer, but in general, everything becomes a bottleneck. Each instruction needs to be executed for each pixel, and since mix will probably translate into at least two pixel shader instructions, this adds up quickly if your GPU is slow. Then, of course, there COULD be bottlenecks if you use too many GPRs, which stall out your shader unit because it can't parallelize as well.

Adding a simple mix() destroys the framerateMy goal is 30fps at least for the Droid and EVO. I vaguely remember games like Backbreaker that SEEM to look quite nice (been a while since I've seen it, I might be wrong). What's the secret here? I have no overdraw, I barely use alpha blending, and this shader is primitive. Do you have any idea? (Btw, will accept answer in a few hours, don't worry :) )

Is there a command line ATI texture compression tool?Thanks! I've use the PVRTexTool on Linux and it works like a charm. Still no solution for the ATI tool, it doesn't work right under Wine. I've actually resigned to using PVR and ETC only at this point. I'll consider DXT5 for alpha textures.