In general, the term "multi-pass rendering" refers to rendering the same object several times with different shaders and accumulating the results in a framebuffer. Accumulation is usually done by mixing, not with shaders. That is, the second shader does not display the result of the first. Each of them performs part of the calculation, and the mixing step combines them into a final value.
Currently, this is primarily done for coverage in direct rendering scenarios. Each time you visualize each object for each light, passing different lighting parameters and, possibly, using different shaders every time you visualize the light. The blending mode used to accumulate the results is additive, since light reflection is an additive property.
Are GLSL 4.0+ routines required? So it is not available in GLSL version of OpenGL ES 2.0?
This is a completely different question from the rest of your post, but the answer is yes and no.
No, in the sense that ARB_shader_subroutine is an extension of OpenGL, and therefore it can be implemented by any implementation of OpenGL. Yes, in a practical sense, that any hardware that really could implement shader_subroutine could also implement the rest of GL 4.x and therefore would already advertise 4.x functionality.
In practice, you will not find shader_subroutine supported by versions of OpenGL other than 4.x.
In GLSL ES 2.0, it is not available because it is GLSL ES . Do not confuse desktop OpenGL with OpenGL ES. These are two different things, with different versions of GLSL and different functions. They donβt even share extensions (with the exception of a few recent ones).
source share