GLSL shader framework

Introduction

The SoShader modules facilitate the prototyping of OpenGL Shading Language (GLSL) algorithms. For detailed information on GLSL please visit www.opengl.org. The SoShader modules offer a low-level access to Fragment/Vertex and Geometry shaders.

If you are looking for a higher-level approach to extensible GLSL shaders, have a look at the GLSL Shader Pipeline, which is built on top of the SoShader modules.

Hardware requirements

Depending on the OpenGL shading language features you would like to use, you’re graphics hardware and supported OpenGL version may vary. OpenGL 2.0 support is required at minimum.

Debugging

For additional debug outputs of the shader framework modules, set the IV_DEBUG_SHADER environment variable before starting MeVisLab.

Modules

  • SoCheckShaderSupport - Can be used to check the current graphics card driver for OpenGL shading language support.
  • SoGeometryShader - Accommodates an OpenGL shading language geometry shader object.
  • SoVertexShader - Accommodates an OpenGL shading language vertex shader object.
  • SoFragmentShader - Accommodates an OpenGL shading language fragment shader object.
  • SoShaderProgram - Links all vertex, geometry, and fragment shaders encountered so far.
  • SoShaderParameter1f - Provides a mean to set a float floating point uniform parameter.
  • SoShaderParameter2f - Provides a mean to set a vec2 floating point uniform parameter.
  • SoShaderParameter3f - Provides a mean to set a vec3 floating point uniform parameter.
  • SoShaderParameter4f - Provides a mean to set a vec4 floating point uniform parameter.
  • SoShaderParameter1i - Provides a mean to set an int integer type uniform parameters.
  • SoShaderParameter2i - Provides a mean to set an ivec2 integer type uniform parameters.
  • SoShaderParameter3i - Provides a mean to set an ivec3 integer type uniform parameters.
  • SoShaderParameterColor - Sets a vec3 uniform parameter from a SoSFColor field.
  • SoShaderParameterMatrix - Sets a mat4 uniform parameter from a SoSFMatrix field.
  • SoShaderParameterMLImageProperties - Reads the SoMLImageElement from the Open Inventor state and provides the information as uniform parameters.
  • SoShaderParameterMLImageSize - Reads the SoMLImageElement from the Open Inventor state and provides access to the image size as an ivec3 uniform parameter.
  • SoMLSampler1D - Reads a 1D subimage for a ML image dataset and provides it as a OpenGL shading language sampler.
  • SoMLSampler2D - Reads a 2D subimage for a ML image dataset and provides it as a OpenGL shading language sampler.
  • SoMLSampler3D - Reads a 3D subimage for a ML image dataset and provides it as a OpenGL shading language sampler.
  • SoMLSamplerCubeMap - Reads 6 adjacent slices of a ML image dataset to provide it as an OpenGL shading language cubemap sampler.
  • SoMLImageProps - The SoMLImageProps module applies the ML-image properties to the Open Inventor traversal state.
  • SoFramebufferSampler2D - Provides an OpenGL framebuffer object as an shading language 2D sampler.
  • SoFramebufferSampler3D - Provides an OpenGL framebuffer object as an shading language 3D sampler.
  • SoMultiPassFramebufferSampler - Allows to accumulate multiple render passes in a sampler.
  • SoInheritedFramebufferSampler - Used to access a previous OpenGL framebuffer sampler.
  • SoGoochShader - Module uses the SoShader C++ API to provide tone shading by mean of the Gooch shader.
  • SoClearShaderState - Clears the Open Inventor traversal state from currently accumulated shader and uniform parameter modules.
  • SoMultiplePass - Group nodes that allows multiple traversals of the attached sub-graph.
  • SoGLRenderState - Modify certain OpenGL state settings.