I am developing a game for iPhone 5. I am seeing significant performance drop with few fragment shaders.
I simplified the problem with a test. I have couple of triangles with most simple vertex & fragment shaders possible.
I have 3 variations of fragment shader
- gl_FragColor = u_vCorlor; // uniform
- gl_FragColor = v_vColor; // varying
- gl_FragColor = gl_FragCoord;
If #1 is the 100fps performance, #2 is 50% less performance and #3 is 75% less performance.
There is significant performance concern with a small change in fragment shader. could someone please suggest how to optimize shaders?