Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: GLES 2 shader performance help

  1. #1
    Intern Contributor
    Join Date
    Jul 2009
    Posts
    51

    GLES 2 shader performance help

    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;



  2. #2
    Intern Contributor
    Join Date
    Jul 2009
    Posts
    51
    I just realized that I can pre multiply the material color into each light on the host, effectively eliminating that whole block of code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •