Systems & hardware

GLSL

GLSL (OpenGL Shading Language) is the high-level shading language for the OpenGL graphics API, used to specify the graphical effects programmatically. GLSL shaders are executed on the GPU to allow for real-time rendering performance. It enables sophisticated effects by controlling the graphics pipeline, allowing for the manipulation of vertices and fragments (pixels) for custom rendering effects.

Share this starting point code.study/glsl
Created by
The Khronos Group
First appeared
2004
Official resource
Visit the main website

Your first program

Hello, World!

GLSL
// A simple GLSL fragment shader that outputs a constant red color
#version 330 core
out vec4 FragColor;

void main() 
{ 
    FragColor = vec4(1.0, 0.0, 0.0, 1.0); // RGBA red
}