The basic of GLSL


OpenGL Shading Language (abbreviated: GLSL), is a high-level shading language based on the syntax of the C programming language. It was created by the OpenGL ARB (OpenGL Architecture Review Board) to give developers more direct control of the graphics pipeline without having to use ARB assembly language or hardware-specific languages.

Graphic rendering pipeline (note: openGL 2.1 don’t have Geometry & Compute Shaders)

This thread is about everything GLSL as we learn more about it.


Vertex and fragment shaders are the most important shaders in the whole pipeline, because they expose the pure basic functionality of the GPU.

With vertex shaders, you can compute the geometry of the object that you are going to render as well as other important elements, such as the scene’s camera, the projection, or how the geometry is clipped.

With fragment shaders, you can control how your geometry will look onscreen: colors, lighting, textures, and so on.


Vertex Shader components are shown in the object data tab in properties window.

Modifiers in the Generate & Modify categories are some form of vertex shader.


Since the vertex shader is handled by blender, does this mean BEER can focus solely on the fragment shader?


Yes and no.
For simple shaders, Blender can handle vertex shader no problem.
For complex shaders, we need to modify vertex shader that Blender provide via API (or even hardcode) to be useful.