Can the precision effect frame rate???

This topic contains 1 reply, has 2 voices, and was last updated by  Xmas 8 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29734

    RichardUK
    Member

    Whilst fixing some texture issues I had I changed the pixel shader from lowp to mediump and it made no difference to the frame rate.

    If it does not I’m considering running my pixel shader all at mediump.

    #32836

    Xmas
    Member

    Yes, precision qualifiers can substantially affect performance. Please have a look at section 7.2 of the Application Development Recommendations document that comes with our OpenGL ES 2.0 SDK.

    A short summary:

    Use lowp to represent colours and any data read from low precision textures, such as normals from a normal map. Be careful not to exceed the numeric range of lowp floats, especially with intermediate results. Swizzling the components of lowp vectors is expensive and should be avoided.

    Use mediump for texture coordinate varyings as well as colours and other values if they exceed the lowp range of [-2, 2].

    Use highp for all vertex position calculations, including transformation matrices, as well as any scalar calculations that use complex built-in functions such as sin, cos, pow, log, etc.

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.