Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
Simple use of the GLSL Shader API using all shader stages

VSG extension Simple demonstration of the use of the GLSL ShaderAPI for all shader stages

This simple example shows how to use the GLSL Shader API.

All shader stages are present in order to show how the Shader API can be used for each of them.

The Tessellation and Geometry shader stages are just passthrough shaders. Their only use is to show some of the Shader API that can be used in these stages.

The example shows a quad whose vertex colors are mixed with a 2D texture.

FILES:

    • Inventor/Shaders/SimplePassthrough/SimplePassthrough.cxx
    • Inventor/Shaders/SimplePassthrough/SimplePassthrough.iv
    • Inventor/Shaders/SimplePassthrough/shaders/01_vert.glsl
    • Inventor/Shaders/SimplePassthrough/shaders/02_tessctrl.glsl
    • Inventor/Shaders/SimplePassthrough/shaders/03_tesseval.glsl
    • Inventor/Shaders/SimplePassthrough/shaders/04_geom.glsl
    • Inventor/Shaders/SimplePassthrough/shaders/05_frag.glsl

SEE ALSO

SoShaderObject SoShaderProgram SoShaderParameter SoVertexShader SoTessellationControlShader SoTessellationEvaluationShader SoGeometryShader SoFragmentShader

SCREENSHOT: