Multiple shader effects on SGX

This topic contains 1 reply, has 2 voices, and was last updated by  Gordon 8 years, 1 month ago.

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


    If multiple shader effects are to be supported on SGX, what is the best way to achieve this without compromising performance:

    1 – Implement each effect as separate shader and switch between the shaders at run time by attaching/detaching with program object or rather switching between program objects at run time
    2 – Implement all the effects as one combined shader and enable/disable desired effects via uniforms

    What is the best option to work with as far as the performance on the PowerVR SGX is concerned keeping in mind its tile based rendering architecture? Thanks.

    – J R Shah



    This depends on your particular use case, but on the whole we would recommend the use of multiple small shaders with the number of changes between them minimised.

    That said, it is possible that many changes of shader program during a render might be slower than a conditional in a single shader, but I would suggest trying the other approach first.

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