SoGVRShaderDiagnosis¶
-
InventorModule
¶ author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoGVR
definition soGVR.def
Purpose¶
The SoGVRShaderDiagnosis
module allows to inspect the GLSL shaders and their warning/error logs. It also provides views of the actually used uniforms and their values.
When the GVR shader pipeline is used (which is the default), it also list all available uniforms and varyings.
It can be used for debugging purposes or to see how a GVR feature is implemented internally. When developing custom SoGVRShaderFunction
, it is a good debug information source.
Tips¶
The module should not be used in production networks, since it will cause overhead and it will update its string fields, causing a repaint.
Fragment Shader¶
Shows the GLSL code of the current fragment shader. Enabling the “Enable Debug Shader” checkbox will replace the current shader with an editable debug shader. This is a nice feature to quickly test a shader modification. The text edit supports GLSL keyword/function completion and the completion of available uniforms/varyings and shader pipeline state members. Pressing “Copy as Debug Shader” copies the current shader to the debug shader.
If the current shader contains warnings/errors, the shader log is shown below the shader code.
Vertex Shader¶
Same as fragment shader, but shows the vertex shader.
Geometry Shader¶
Same as fragment shader, but shows the geometry shader and does not support a debug shader.
Program Info¶
Shows the link information of the GLSL program and additional warnings/errors given by the driver or the shader pipeline.
Active Uniforms¶
Shows all active uniforms of the current shader. This includes both builtin GL uniforms, GVR uniforms and external uniforms provided by SoShaderParameter3f
etc.
This list shows quite well how the driver optimizes the shaders, as unused texture samplers and uniforms will disappear in this list.
Enabling “Fetch active uniform values” shows the values that the uniforms currently have. NOTE: enabling this will cause the fields to change on each rendering, so the FPS of the rendering will drop substantially, only use this for debugging!
Available Uniforms¶
This lists all uniforms that are available in the current render mode and may be used in the SoGVRShaderFunction
.
Available Includes¶
This lists all includes that the GVR shader pipeline provides and the user provided SoGVRShaderInclude
modules.
Output Fields¶
self¶
-
name:
self
, type:
SoNode
¶ a node that should be put in front of the
SoGVRVolumeRenderer
. The module will update its content when the scene is rendered in a viewer.
Parameter Fields¶
Field Index¶
Available State Members : String |
availableUniformTypes : String |
geometryShaderError : Bool |
availableFragmentShaderStateMembers : String |
availableVaryingNames : String |
programLinkError : Bool |
availableFragmentShaderStateMemberTypes : String |
availableVaryingTypes : String |
userFragmentShader : String |
availableFragmentShaderSteps : String |
availableVertexShaderStateMembers : String |
userVertexShader : String |
availableIncludeNames : String |
availableVertexShaderStateMemberTypes : String |
vertexShaderError : Bool |
availableIncludes : String |
availableVertexShaderSteps : String |
|
availableUniformNames : String |
Enabled : Bool |
|
availableUniformSizes : String |
fragmentShaderError : Bool |