Tutorial by Examples

Detailed instructions on getting glsl set up or installed.
A simple OGL 4.0 GLSL shader program with vertex position and color attribute. The program is executed with a phyton script. To run the script, PyOpenGL must be installed. A shader program consists at least of a vertex shader and a fragmant shader (exception of computer shaders). The 1st shader s...
A simple OGL 4.0 GLSL shader program that shows the use of a model, view, and projection matrix The program is executed with a phyton script. To run the script, PyOpenGL and NumPy must be installed. Projection matrix: The projection matrix describes the mapping of a pinhole camera from 3D poi...
A simple OGL 4.0 GLSL shader program that shows how to map a 2D texture on a mesh. The program is executed with a phyton script. To run the script, PyOpenGL and NumPy must be installed. The texture matrix defines how the texture is mapped on the mesh. By manipulating the texture matrix, the textu...
A simple OGL 4.0 GLSL shader program that shows the use of a interface block and a uniform block on a Cook-Torrance microfacet light model implementation. The program is executed with a phyton script. To run the script, PyOpenGL and NumPy must be installed. An Interface Block is a group of GLSL in...
A simple OGL 4.0 GLSL shader program that shows the use of geometry shaders. The program is executed with a phyton script. To run the script, PyOpenGL and NumPy must be installed. In this example, the entire geometry (a cylinder) is generated in the geometry shader. Vertex shader geo.vert #vers...
A simple OGL 4.0 GLSL shader program that shows the use shader subroutines. The program is executed with a phyton script. To run the script, PyOpenGL and NumPy must be installed. The subroutines switch between different geometry generated in the geometry shader and change the surface representatio...
A simple OGL 4.0 GLSL shader program that shows that shows how to add details with tessellation shader to the geometry. The program is executed with a python script. To run the script, PyOpenGL and NumPy must be installed. The basic mesh in this example is an icosahedron that consists of 20 triang...

Page 1 of 1