MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #30126 All Revisions ] Back to Issue ]
Summary 0030126: Visualization, OpenGl_ShaderManager - define standard Lighting & Clipping within custom GLSL programs as template functions
Revision 2018-09-11 14:14 by kgv
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.
Revision 2018-09-11 14:12 by kgv
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.

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.


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker