Why do you do it in the pixel shader?
It should be done in the vertex shader.
An object that is 256x256 in size and use the same screen space as its size.
So do you do the simple calculation 65536 times each time its drawn.
But if you do it on an object with 2 vertexes and in the vertex shader so is this done 2 times and do the same thing.
Anything that can be done in the vertex shader should be done there.
But there is simply alot that have to be done in the fragment shader.
Shaders are very slow on mobiles
Thats why iam many times writing! anything that can be done in the vertex do it there
Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz