This example shows how to generate geometry using tessellation shaders.
This simple example shows how to use tessellation shaders.
The basic shape is an icosahedron and sliders allow to modify tessellation parameters. When inner parameter change the number of generated point inside each triangles while outer parameter change the number of generated point on each edges. This example subdivides the icosahedron in such a way that it approaches a perfect sphere.
FILES:
-
Inventor/examples/Features/Shaders/TessellationShader/TessellationShader.cxx
-
Inventor/examples/Features/Shaders/TessellationShader/TessShaderVtx.glsl
-
Inventor/examples/Features/Shaders/TessellationShader/TessShaderTessControl.glsl
-
Inventor/examples/Features/Shaders/TessellationShader/TessShaderTessEvaluation.glsl
-
Inventor/examples/Features/Shaders/TessellationShader/TessShaderGeom.glsl
-
Inventor/examples/Features/Shaders/TessellationShader/TessShaderFrag.glsl
SEE ALSO
SoShaderObject, SoShaderProgram, SoShaderParameter, SoTessellationControlShader, SoTessellationEvaluationShader
SCREENSHOT: