Open Inventor
Shaders

These demos require programmable shader support (vertex shader and/or fragment shader). The OGLInfo program can be used to determine what support for shader features is available on your graphics board.

AnimatedFlag

  

$OIVHOME/src/Inventor/examples/Features/Shaders/AnimatedFlag.cxx

This example shows you how to code an animation within a vertex shader program in order to speed up the rendering. A dialog window allows you to select which shading language to use when the example is executed.

PixelLighting

     

$OIVHOME/src/Inventor/examples/Features/Shaders/PixelLighting.cxx

This example computes per-pixel lighting (only the diffuse contribution is computed) on a sub-scene graph. Per-pixel lighting gives better lighting quality than per-vertex lighting. A dialog window allows you to select which shading language to use when the example is executed.

ShadersBrowser

$OIVHOME/src/Inventor/demos/ShadersBrowser/ShadersBrowser.cxx

An example of a reflection, refraction, and chromatic dispersion shader program.

ToonShading

     

$OIVHOME/src/Inventor/examples/Features/Shaders/ToonShading.cxx

This example shows you how to code a cartoon rendering with a vertex and a fragment shader. A dialog window allows you to select which shading language to use when the example is executed.