Targeted use for shaders on mobile devices right now?

At first: I don’t want to question the whole shader support feature. I just want give feedback what I have experienced.

I found really some nice shader codes and ported them to run successfully on the sim but performance on the actual device (iPhone 5) was really slow. For example a fullscreen size shader (a rect that spans the whole device screen) that creates a space nebula scene. But it seems the really nice shaders are way to complex which I think is a problem of the hardware. Here is the original shader on shadertoy.

As far as I have tested now the shaders should not be:

  • too complex
  • too big (I think size does matter here, the more pixel the image texture has, the more the fragment shader gets called)

So right now, what do you think is the most useful scenario for using shaders?

One thing I found is creating outlines on png images that do not have a rectangle form (using alpha).

Maybe you can just throw in some useful scenarios.

Yea that makes sense.

The fragment shaders execute for *every* pixel. That means the more complex the shader code is or the larger the texture, the more costly it is. 

In the shader you were using, it contains a for-loop which is *very* expensive. For-loops and if-else branches should be avoided if you want good shader performance.

Yea that makes sense.

The fragment shaders execute for *every* pixel. That means the more complex the shader code is or the larger the texture, the more costly it is. 

In the shader you were using, it contains a for-loop which is *very* expensive. For-loops and if-else branches should be avoided if you want good shader performance.