Skip to content
Agents tracked: 502 Releases (7d): 613 Agent status: 4 with issuesSince last limit reset: Claude 7d · Codex 5d For AI agents: Markdown Updated Nov 18, 2026

The Book of Shaders

by Patricio Gonzalez Vivo and Jen Lowe

Step-by-step online guide to fragment shaders (noise, patterns, shaping functions) with live editable examples; for learning, not reuse.

Video references and motion backgrounds Libraryabstractgeometric

GitHub repoWebsite
Three backgrounds drawn by three short shaders of our own (soft waves, a grid of pulsing dots and rings), each running live in a canvas.
Made by AgentGid with glslCanvas 0.2.6 (npm, MIT). No text, code or pictures from The Book of Shaders are used, because its license forbids that. The three shaders are our own; they run in glslCanvas 0.2.6, the player the book uses, which is MIT licensed.

2. Commercial use: raw.githubusercontent.com

“You cannot use this Work in any”

The book's text and example code may not be used in any product, paid or free; your own original shaders are fine.

raw.githubusercontent.com

License checked Nov 5, 2026 against 1 official page. Tap a verdict to see its source. How we checked Report an error

The Book of Shaders: learn to code pixel effects

The Book of Shaders is a free online book that teaches fragment shaders, small programs that color every pixel of a picture at once. Each chapter has live examples you can change in the browser and see the result right away. It is for learning only, because its license forbids reusing its text or example code in any site, app or project.

Where you can use it

Learn to make animated backgrounds

Read the chapters on shapes, patterns, random and noise, then write your own moving background for a landing page instead of a video file.

Run your own shader on a page

Show a shader you wrote on a web page with glslCanvas, the small open player the book itself uses for its live examples.

Read shader code your AI writes Idea

When your AI assistant writes a shader for a background or an effect, the early chapters help you follow what each line does and spot why a screen stays white.

Image filters and effects

Learn the ideas behind photo filters, blurs and color effects on the graphics chip, then build your own versions for an app or a video tool.

Shaders in three.js or Processing

See how the same shader setup is wired into frameworks you may already use, such as three.js, Processing and openFrameworks.

Links in your own lessons

If you teach a class or write a tutorial, link to a chapter with credit; the license allows a link and an unchanged screenshot as part of teaching material.

The Book of Shaders popularity

29 / 100
Gid Score, same scale as developer tools
7,079
GitHub stars
The Book of Shaders: GitHub starspatriciogonzalezvivo/thebookofshaders 7,079

How the Gid Score is calculated

How to start

Tell your AI assistant

“Write me an original fragment shader for a slow, soft gradient background (do not copy code from The Book of Shaders, its license forbids reuse), and run it in a canvas behind the hero section with glslCanvas 0.2.6 served from our own files.”

Show codeStep 2 or Step 3

To run shaders you write yourself on a page, install glslCanvas (MIT) and load its dist/GlslCanvas.js file.

npm install glslCanvas

Mistakes to avoid

Copying a chapter's example shader into a client site or app and adding a credit line
Write an original shader after reading, or use a library whose license allows reuse

Credit does not make reuse allowed; the license forbids using the work in any product, website or project.

Loading glslCanvas from the rawgit.com script link shown in its README
npm install glslCanvas@0.2.6 and serve dist/GlslCanvas.js from your own site

The README's link points at rawgit.com, and that file returned 404 in our check on 2026-11-10; our demo used the npm file.

gl_FragColor = vec4(1,0,0,1);
gl_FragColor = vec4(1.0,0.0,0.0,1.0);

GLSL does not promise to turn whole numbers into decimals, so some graphics chips refuse the shader and show a white screen.

A WebGL fragment shader without a precision line at the top
Start the shader with precision mediump float; as the book's examples and our demo do

Browser shaders need a float precision; the book sets it in the second line of its first example.

License

All rights reserved (educational sharing only) license. All rights reserved: you may read it and link to it with credit. You may not copy its text or example code into any product, website or project, paid or free. Shaders you write yourself after learning are yours.

Commercial use
No

“You cannot use this Work in any” raw.githubusercontent.com

Credit
Required

“through an URL, proper attribution and unmodified screenshot” raw.githubusercontent.com

Inside your app or game
Not allowed

“You cannot host, display, distribute or share this Work in any form,” raw.githubusercontent.com

Pass the files on to your users
Not allowed

“You cannot host, display, distribute or share this Work in any form,” raw.githubusercontent.com

AI training
Not stated
Bots and bulk downloads
Not stated

AllowedWith conditionsNot allowedNot stated or not checked yet

Is The Book of Shaders free for commercial use? The full answer Not legal advice. Check the license page before you ship.

For your agent

License rules tell your agent what it may do with The Book of Shaders. Paste them into your prompt or AGENTS.md.

License rules
- The Book of Shaders (Video references and motion backgrounds, Web animation examples and effects). Step-by-step online guide to fragment shaders (noise, patterns, shaping functions) with live editable examples; for learning, not reuse. Price: free; non-commercial only; credit required; cannot ship inside an app; cannot pass the files on to your users or run a similar service. Style: abstract, geometric.
  Connect: download from https://thebookofshaders.com (no API).
  Get files: Look only: read the chapters to learn techniques, then write original shader code (glsl).
  Not allowed: No use in any product or website
  Rule: Learn from it; do not copy its text or example code into a product or website.
  Rule: Link with attribution only.
  License: https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE (checked 2026-11-05; details: https://agentgid.com/assets/the-book-of-shaders/)
Can an agent use it by itself?
No.

Look only: use it as inspiration, do not copy.

How an agent gets files
Look only: read the chapters to learn techniques, then write original shader code.

Formats: glsl

API, key or account
Not needed. Everything runs on your side.
MCP server
None found
Credit line, if you want one
The Book of Shaders (thebookofshaders.com)
This card for machines

Alternatives

The Book of Shaders This page

Free Non-commercial Download

ShaderGradient

Pick ShaderGradient when you want a ready animated gradient background that you tune in a web editor and drop into React, without learning shader code.

Free Commercial OK npm

Vanta.js

Pick Vanta.js when you want a finished animated 3D background (waves, fog, birds) in a few lines instead of writing your own.

Free Commercial OK npm

GLSL Sandbox

Pick GLSL Sandbox when you want to browse many finished community shaders for ideas; it is a gallery, not a step-by-step course.

Free Unclear Download

Theatre.js

Animation library with a visual timeline editor for motion graphics on the web: animate DOM, three.js/R3F scenes and any JS values.

Free Commercial OK npm

LYGIA

Large multi-language shader function library (noise, SDFs, color, lighting, filters) for GLSL, HLSL, WGSL and Metal.

Free tier With conditions npm

All video references and motion backgrounds

Questions

Can I copy an example shader from the book into my website?

No. The license forbids using the work in any commercial or non-commercial product, website or project. Learn from it and write your own.

Can I mention it in my course or video?

Yes, as teaching material you may link to it with proper credit and show an unchanged screenshot.

What do I need to start?

A modern browser with WebGL, such as Chrome, Firefox or Safari, and some coding experience.

Where can what I learn be used?

In any place that runs GLSL shaders, such as three.js websites, Processing sketches, openFrameworks apps or mobile games.

Is the tool that runs the live examples free to use?

Yes. glslCanvas, the player behind the live examples, is a separate project under the MIT license.