MantisBT - Open CASCADE
View Issue Details
0030126Open CASCADE[OCCT] OCCT:Visualizationpublic2018-09-11 14:122020-09-21 17:46
[OCCT] 7.6.0* 
0030126: Visualization, OpenGl_ShaderManager - define standard Lighting & Clipping within custom GLSL programs as template functions
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.
No tags attached.
related to 0030700verified apn Visualization, TKOpenGl - support PBR Metallic-Roughness shading model 
child of 0024192closed abv Adding support for shaders to OCCT visualization toolkit 
child of 0025282closed bugmaster Visualization, OpenGl_PrimitiveArray - provide built-in GLSL programs as alternative to FFP 
child of 0030631new kgv Visualization - Vulkan graphic driver prototype 
Issue History
2018-09-11 14:12kgvNew Issue
2018-09-11 14:12kgvAssigned To => kgv
2018-09-11 14:13kgvRelationship addedchild of 0024192
2018-09-11 14:14kgvDescription Updatedbug_revision_view_page.php?rev_id=19887#r19887
2018-09-11 14:15kgvRelationship addedchild of 0025282
2019-04-17 14:11kgvRelationship addedchild of 0030631
2019-05-07 14:27kgvRelationship addedrelated to 0030700
2019-09-04 15:43abvTarget Version7.4.0 => 7.5.0
2020-09-21 17:46kgvTarget Version7.5.0 => 7.6.0*

There are no notes attached to this issue.