View Full Version : GLES 2 shader performance help

11-24-2013, 12:58 PM
Not sure why, hoping someone here with mobile shader experience can help. My performance boosts by 10-15 FPS when I remove this code. It must have something to do with iPad 2's GPU being a scalar processor maybe.
Can anyone help me speed this up?

The performance with the code commented is more comparable to OpenGL ES 1.1 which I'm targeting and emulating.

In my vertex shader:

//final surface color computation
color = (lightModelProductSceneColor) +
ambient * material.ambient +
specular * material.specular +
diffuse * material.diffuse;

11-24-2013, 10:21 PM
I just realized that I can pre multiply the material color into each light on the host, effectively eliminating that whole block of code.