# The Book of Shaders — card for AI agents

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

Category: Video references and motion backgrounds (also: Web animation examples and effects) · maker Patricio Gonzalez Vivo and Jen Lowe · checked 2026-11-05 · style: abstract, geometric

## Price
- Price: Free
- Free tier: Free to read online.

## License
All rights reserved (educational sharing only) — https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE

- commercial: **no** (Non-commercial only)
  > You cannot use this Work in any
  (https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE)
- attribution: **required** (Credit required)
  > through an URL, proper attribution and unmodified screenshot
  (https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE)
- in app: **no** (Cannot ship inside an app)
  > You cannot host, display, distribute or share this Work in any form,
  (https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE)
- redistribute: **no** (Cannot pass the files on to your users or run a similar service)
  > You cannot host, display, distribute or share this Work in any form,
  (https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE)

## Rules to follow
- Learn from it; do not copy its text or example code into a product or website.
- Link with attribution only.

## Can an AI agent use it by itself?
**No** · look-only: 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. (sign-in: none)
- Formats: glsl
- Not allowed: No use in any product or website

## How to connect
- Download only
- Repository: https://github.com/patriciogonzalezvivo/thebookofshaders
- Website: https://thebookofshaders.com

## Notes
Repo license (2025) is all-rights-reserved and forbids use in commercial or non-commercial projects.

## Numbers (AgentGid data)
- Gid Score: 29
- GitHub stars: 7,079

## Lines to paste 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/)
```

## Links
- AgentGid page: https://agentgid.com/assets/the-book-of-shaders/
- Is it free for commercial use? https://agentgid.com/assets/the-book-of-shaders/commercial-use/
- Source: https://thebookofshaders.com/
- Source: https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE


## 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 to 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: 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. (idea, not from the official pages)
- 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.

### How to start
- Read the book in a browser that supports WebGL; start with chapter 1 and edit the live examples as you go.
- 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>
```


### 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.

### Good to know
- The license file is stricter than some older pages. Chapter 4 still says you can copy the book's shaders into a three.js page, but the license now forbids any reuse.
- It is written for people who already code and know some basic school math about angles and vectors.
- It covers fragment shaders only: it is not a full guide to WebGL or OpenGL, and it does not teach the math in detail.
- The live examples need a browser with WebGL. When a shader has an error, the example shows a white screen instead of a message.
- The project's online editor can share a shader as a link, which stores your code on its site.

Checked 2026-11-10 against: https://thebookofshaders.com/, https://thebookofshaders.com/00/, https://thebookofshaders.com/01/, https://thebookofshaders.com/02/, https://thebookofshaders.com/04/, https://thebookofshaders.com/05/, https://thebookofshaders.com/10/, https://thebookofshaders.com/11/, https://thebookofshaders.com/13/, https://thebookofshaders.com/appendix/, https://thebookofshaders.com/appendix/00/, https://thebookofshaders.com/examples/, https://github.com/patriciogonzalezvivo/thebookofshaders/blob/master/LICENSE, https://github.com/patriciogonzalezvivo/thebookofshaders/blob/master/README.md, https://github.com/patriciogonzalezvivo/glslCanvas/blob/master/README.md, https://github.com/patriciogonzalezvivo/glslCanvas/blob/master/LICENSE, https://registry.npmjs.org/glslCanvas/latest

### Mistakes to avoid
- Don't: Copying a chapter's example shader into a client site or app and adding a credit line → Do: 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.)
- Don't: Loading glslCanvas from the rawgit.com script link shown in its README → Do: 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.)
- Don't: gl_FragColor = vec4(1,0,0,1); → Do: 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.)
- Don't: A WebGL fragment shader without a precision line at the top → Do: 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.)

### 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.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
