|Description||Currently, defining a custom GLSL program requires redefining of all major blocks, including shading (lighting) and clipping.|
This limits flexibility of custom programs at application level, since when lighting is required, significant code blocks have to be copied, complicating GLSL source code and its maintenance (considering that application requires a minor customization of shader code).
It is proposed redefining major portions of standard GLSL programs as reusable functions, which custom GLSL program can mark as blocks for template substitution at Shader Manager.
This conception is already used within some custom Shader Managers within OCC Products - the approach can be adapted and improved for OpenGl_ShaderManager, and ideally custom Shader Managers can be further replaced by standard one.
Another issue is optimization of custom GLSL programs depending on number of lights and clipping planes - currently, these optimizations (handful for low-end hardware) are applicable only to built-in GLSL programs, because custom GLSL has only one cached instance within current design.