GLSL (OpenGL Shading Language) is a high-level C-like programming language for writing shaders that execute on the GPU within the OpenGL and WebGL graphics pipelines. It lets developers program the programmable stages, principally vertex and fragment shaders, to control geometry transformation, lighting, and per-pixel colour. GLSL is a foundational tool for real-time rendering and visual effects.
Content
- GLSL programs run massively in parallel on the GPU, with vertex shaders transforming geometry and fragment shaders computing per-pixel output, alongside geometry, tessellation, and compute shaders in modern versions. The language provides vector and matrix types, built-in functions for trigonometry and texture sampling, and qualifiers controlling data flow between stages. It compiles within the graphics driver, contrasting with HLSL for Direct3D and the newer SPIR-V intermediate representation used by Vulkan.