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

1. Price: thebookofshaders.com
Free to read online.
thebookofshaders.comNo quote yet: price is read from the official pages.
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.com3. Credit the author: raw.githubusercontent.com
“through an URL, proper attribution and unmodified screenshot”
The Book of Shaders (thebookofshaders.com)
raw.githubusercontent.com4. Agent access: github.com/patriciogonzalezvivo/thebookofshaders
There is no package or API. Files are downloaded by hand from the official site.
github.com/patriciogonzalezvivo/thebookofshadersLicense 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
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
Give a canvas the class glslCanvas and point it at your own shader file.
<canvas class="glslCanvas" data-fragment-url="shader.frag" width="500" height="500"></canvas>
Mistakes to avoid
Credit does not make reuse allowed; the license forbids using the work in any product, website or project.
npm install glslCanvas@0.2.6 and serve dist/GlslCanvas.js from your own siteThe 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.
GLSL does not promise to turn whole numbers into decimals, so some graphics chips refuse the shader and show a white screen.
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.
“You cannot use this Work in any” raw.githubusercontent.com
“through an URL, proper attribution and unmodified screenshot” raw.githubusercontent.com
“You cannot host, display, distribute or share this Work in any form,” raw.githubusercontent.com
“You cannot host, display, distribute or share this Work in any form,” raw.githubusercontent.com
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.
- 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/)
Look only: use it as inspiration, do not copy.
Formats: glsl
The Book of Shaders (thebookofshaders.com)Alternatives
The Book of Shaders This page
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.
Pick Vanta.js when you want a finished animated 3D background (waves, fog, birds) in a few lines instead of writing your own.
Pick GLSL Sandbox when you want to browse many finished community shaders for ideas; it is a gallery, not a step-by-step course.
Animation library with a visual timeline editor for motion graphics on the web: animate DOM, three.js/R3F scenes and any JS values.
Large multi-language shader function library (noise, SDFs, color, lighting, filters) for GLSL, HLSL, WGSL and Metal.
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.