ToolsLightweight
Raw WebGL
Graphics with no toolkit: tiny page, lots of code.
Drawing straight through the browser’s graphics API with no toolkit at all. The page stays tiny and you control every pixel, and even a simple scene takes a lot of code. Worth it for a single full-screen shader effect with zero dependencies.
- Breaks when
- boilerplate eats the prompt budgetsilent black canvas on any shader error
- Also called
- vanilla WebGL, WebGL2, OGL
Prompts
Zero-dependency hero shader
One HTML file, no libraries. WebGL2 context with antialias off and alpha false. A single full-screen triangle (3 vertices, no index buffer). The fragment shader takes uTime, uResolution and uPointer; the image is a domain-warped FBM in two brand colors. Handle context loss (webglcontextlost → preventDefault; on restore, recompile). Cap DPR at 1.5 and render only while the canvas is in view. Under 6 KB total.
Instanced quads by hand
Raw WebGL2: 20,000 quads via drawArraysInstanced. Per-instance attributes (vec2 offset, float phase, float size) in one interleaved buffer with vertexAttribDivisor(…, 1). The vertex shader moves each quad on a sine of uTime + phase; the fragment shader draws a soft circle with smoothstep alpha and premultiplied blending. Comment every gl call; no helper library.
Ping-pong trail
Vanilla WebGL2 with two RGBA16F framebuffers (EXT_color_buffer_float). Pass A reads the previous frame, fades it by 0.985 and adds a splat under the pointer. Pass B displays it through a tone curve. Fall back to RGBA8 when the extension is missing. One JS file with a small createProgram helper and nothing else.
Related
Resources · 3
- WebGL Fluid SimulationThe cursor-fluid everyone forks. Stable Fluids in one file.PavelDoGreatGitHub · code · demoAug 30, 2026
- WebGL Gaussian Splat ViewerSplats with zero dependencies; sorting on a worker.antimatter15GitHub · code · demoAug 20, 2026
- OGL: minimal WebGL libraryoframeGitHub · code · demoMay 1, 2026