Tested tool guide
Tested browser tools
Checked August 16, 2026
What WebGL Shader Playground does, with a checked example
Write GLSL in the editor and the tool compiles it into a WebGL program drawn to a full-screen quad in real time. Uniforms you declare in the shader become controls on the page, so values can be tuned without editing code. The surprise for most newcomers: a fragment shader runs once per pixel, knows nothing about neighboring pixels, and receives coordinates in raw pixels with the origin at the bottom-left, not a tidy 0-to-1 space. Code lifted from desktop GLSL tutorials often fails to compile, because the dialect here is GLSL ES 1.00, not desktop GLSL.
Worked example
A concrete input and expected output from the current implementation.
Input
precision mediump float;
void main() {
vec2 cell = floor(gl_FragCoord.xy / 32.0);
float check = mod(cell.x + cell.y, 2.0);
gl_FragColor = vec4(vec3(check), 1.0);
} ->
Expected output
A checkerboard of 32-pixel squares covering the whole canvas: black in the bottom-left corner, white in every horizontally or vertically adjacent square, alternating out across the full screen. The pattern is independent of the canvas size, so it looks the same whether the preview window is small or full screen.
Pasted into the fragment editor with the tool's default full-screen-quad vertex shader, this compiles and renders. gl_FragCoord.xy is the current pixel's position in pixels, so dividing by 32 and flooring groups pixels into 32-by-32 cells, and mod() of the sum of cell coordinates alternates between 0.0 (black) and 1.0 (white) from cell to cell; the 0.5-pixel offset of pixel centers never changes the cell index.