{
 "slug": "the-book-of-shaders",
 "name": "The Book of Shaders",
 "author": "Patricio Gonzalez Vivo and Jen Lowe",
 "density": "full",
 "status": "active",
 "status_note": null,
 "alternatives_page": null,
 "one_liner": "Step-by-step online guide to fragment shaders (noise, patterns, shaping functions) with live editable examples; for learning, not reuse.",
 "category": {
  "slug": "video-backgrounds",
  "name": "Video references and motion backgrounds"
 },
 "tags": [
  "Library"
 ],
 "styles": [
  "abstract",
  "geometric"
 ],
 "logo_url": "https://agentgid.com/media/avatars/patriciogonzalezvivo.png",
 "logo_letter": "T",
 "links": {
  "repo": "https://github.com/patriciogonzalezvivo/thebookofshaders",
  "website": "https://thebookofshaders.com",
  "api_docs": null
 },
 "preview": {
  "kind": "image_grid",
  "src": "https://agentgid.com/assets/the-book-of-shaders/demo.jpg",
  "alt": "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.",
  "caption": "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."
 },
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Free",
   "status": "yes",
   "sub": "No paid plan",
   "quote": null,
   "note": "Free to read online.",
   "source": {
    "label": "thebookofshaders.com",
    "url": "https://thebookofshaders.com"
   },
   "n": 1
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "No",
   "status": "no",
   "sub": "All rights reserved",
   "quote": "You cannot use this Work in any",
   "note": "The book's text and example code may not be used in any product, paid or free; your own original shaders are fine.",
   "source": {
    "label": "raw.githubusercontent.com",
    "url": "https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE"
   },
   "n": 2
  },
  {
   "key": "credit",
   "label": "Credit the author",
   "value": "Required",
   "status": "cond",
   "sub": "Show a credit line",
   "quote": "through an URL, proper attribution and unmodified screenshot",
   "note": "The Book of Shaders (thebookofshaders.com)",
   "source": {
    "label": "raw.githubusercontent.com",
    "url": "https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE"
   },
   "n": 3
  },
  {
   "key": "agent_access",
   "label": "Agent access",
   "value": "Download",
   "status": "info",
   "sub": "Files by hand",
   "quote": null,
   "note": "There is no package or API. Files are downloaded by hand from the official site.",
   "source": {
    "label": "github.com/patriciogonzalezvivo/thebookofshaders",
    "url": "https://github.com/patriciogonzalezvivo/thebookofshaders"
   },
   "n": 4
  }
 ],
 "license": {
  "name": "All rights reserved (educational sharing only)",
  "url": "https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE",
  "summary": "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.",
  "pages_read": 1,
  "rules": [
   "Learn from it; do not copy its text or example code into a product or website.",
   "Link with attribution only."
  ],
  "rows": [
   {
    "label": "Commercial use",
    "value": "No",
    "status": "no",
    "quote": "You cannot use this Work in any",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE"
    },
    "note": null
   },
   {
    "label": "Credit",
    "value": "Required",
    "status": "cond",
    "quote": "through an URL, proper attribution and unmodified screenshot",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE"
    },
    "note": null
   },
   {
    "label": "Inside your app or game",
    "value": "Not allowed",
    "status": "no",
    "quote": "You cannot host, display, distribute or share this Work in any form,",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE"
    },
    "note": null
   },
   {
    "label": "Pass the files on to your users",
    "value": "Not allowed",
    "status": "no",
    "quote": "You cannot host, display, distribute or share this Work in any form,",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE"
    },
    "note": null
   },
   {
    "label": "AI training",
    "value": "Not stated",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   },
   {
    "label": "Bots and bulk downloads",
    "value": "Not stated",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   }
  ],
  "checked_at": "2026-11-05",
  "commercial_use_page": "https://agentgid.com/assets/the-book-of-shaders/commercial-use/"
 },
 "overview": {
  "heading": "The Book of Shaders: learn to code pixel effects",
  "body": "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."
 },
 "uses": [
  {
   "title": "Learn to make animated backgrounds",
   "text": "Read the chapters on shapes, patterns, random and noise, then write your own moving background for a landing page instead of a video file.",
   "idea": false,
   "image": null
  },
  {
   "title": "Run your own shader on a page",
   "text": "Show a shader you wrote on a web page with glslCanvas, the small open player the book itself uses for its live examples.",
   "idea": false,
   "image": null
  },
  {
   "title": "Read shader code your AI writes",
   "text": "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": true,
   "image": null
  },
  {
   "title": "Image filters and effects",
   "text": "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.",
   "idea": false,
   "image": null
  },
  {
   "title": "Shaders in three.js or Processing",
   "text": "See how the same shader setup is wired into frameworks you may already use, such as three.js, Processing and openFrameworks.",
   "idea": false,
   "image": null
  },
  {
   "title": "Links in your own lessons",
   "text": "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.",
   "idea": false,
   "image": null
  }
 ],
 "start": {
  "prompt": "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.",
  "install": null,
  "install_note": null,
  "code": [
   {
    "tab": "Step 2",
    "intro": "To run shaders you write yourself on a page, install glslCanvas (MIT) and load its dist/GlslCanvas.js file.",
    "source": "npm install glslCanvas"
   },
   {
    "tab": "Step 3",
    "intro": "Give a canvas the class glslCanvas and point it at your own shader file.",
    "source": "<canvas class=\"glslCanvas\" data-fragment-url=\"shader.frag\" width=\"500\" height=\"500\"></canvas>"
   }
  ]
 },
 "mistakes": [
  {
   "dont": "Copying a chapter's example shader into a client site or app and adding a credit line",
   "fix": "Write an original shader after reading, or use a library whose license allows reuse",
   "why": "Credit does not make reuse allowed; the license forbids using the work in any product, website or project.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "Loading glslCanvas from the rawgit.com script link shown in its README",
   "fix": "npm install glslCanvas@0.2.6 and serve dist/GlslCanvas.js from your own site",
   "why": "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.",
   "dont_code": false,
   "fix_code": true
  },
  {
   "dont": "gl_FragColor = vec4(1,0,0,1);",
   "fix": "gl_FragColor = vec4(1.0,0.0,0.0,1.0);",
   "why": "GLSL does not promise to turn whole numbers into decimals, so some graphics chips refuse the shader and show a white screen.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "A WebGL fragment shader without a precision line at the top",
   "fix": "Start the shader with precision mediump float; as the book's examples and our demo do",
   "why": "Browser shaders need a float precision; the book sets it in the second line of its first example.",
   "dont_code": false,
   "fix_code": false
  }
 ],
 "agent": {
  "self_serve": false,
  "self_serve_text": "Look only: use it as inspiration, do not copy",
  "install": null,
  "repo": "https://github.com/patriciogonzalezvivo/thebookofshaders",
  "api_docs": null,
  "api_account": "Not needed. Everything runs on your side.",
  "get_files": "Look only: read the chapters to learn techniques, then write original shader code.",
  "formats": [
   "glsl"
  ],
  "limits": null,
  "mcp": null,
  "mcp_url": null,
  "credit_line": "The Book of Shaders (thebookofshaders.com)",
  "rules_text": "- 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.\n  Connect: download from https://thebookofshaders.com (no API).\n  Get files: Look only: read the chapters to learn techniques, then write original shader code (glsl).\n  Not allowed: No use in any product or website\n  Rule: Learn from it; do not copy its text or example code into a product or website.\n  Rule: Link with attribution only.\n  License: https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE (checked 2026-11-05; details: https://agentgid.com/assets/the-book-of-shaders/)",
  "agent_md": "https://agentgid.com/assets/the-book-of-shaders/agent.md",
  "card_json": "https://agentgid.com/assets/the-book-of-shaders/card.json"
 },
 "popularity": {
  "gid_score": 29,
  "stars": 7079,
  "downloads_7d": null,
  "downloads_7d_label": null,
  "downloads_change_4w_pct": null,
  "eco": null,
  "package": null,
  "repo": "patriciogonzalezvivo/thebookofshaders",
  "agent_projects": null,
  "agent_projects_total": null,
  "downloads_unconfirmed": false,
  "series": {
   "downloads_weekly": [],
   "stars": [
    [
     "2026-11-07",
     7069
    ],
    [
     "2026-11-08",
     7069
    ],
    [
     "2026-11-09",
     7070
    ],
    [
     "2026-11-10",
     7069
    ],
    [
     "2026-11-11",
     7072
    ],
    [
     "2026-11-12",
     7074
    ],
    [
     "2026-11-13",
     7076
    ],
    [
     "2026-11-14",
     7076
    ],
    [
     "2026-11-15",
     7077
    ],
    [
     "2026-11-16",
     7079
    ],
    [
     "2026-11-17",
     7079
    ]
   ]
  },
  "stars_flat_since": null,
  "updated_at": "2026-11-17"
 },
 "alternatives": [
  {
   "slug": "the-book-of-shaders",
   "name": "The Book of Shaders",
   "why": null,
   "current": true,
   "price": "Free",
   "commercial": {
    "value": "Non-commercial",
    "status": "no"
   },
   "access": "Download"
  },
  {
   "slug": "shadergradient",
   "name": "ShaderGradient",
   "why": "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.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "vanta-js",
   "name": "Vanta.js",
   "why": "Pick Vanta.js when you want a finished animated 3D background (waves, fog, birds) in a few lines instead of writing your own.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "glsl-sandbox",
   "name": "GLSL Sandbox",
   "why": "Pick GLSL Sandbox when you want to browse many finished community shaders for ideas; it is a gallery, not a step-by-step course.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Unclear",
    "status": "unknown"
   },
   "access": "Download"
  },
  {
   "slug": "theatre-js",
   "name": "Theatre.js",
   "why": "Animation library with a visual timeline editor for motion graphics on the web: animate DOM, three.js/R3F scenes and any JS values.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "lygia",
   "name": "LYGIA",
   "why": "Large multi-language shader function library (noise, SDFs, color, lighting, filters) for GLSL, HLSL, WGSL and Metal.",
   "current": false,
   "price": "Free tier",
   "commercial": {
    "value": "With conditions",
    "status": "cond"
   },
   "access": "npm"
  }
 ],
 "faq": [
  {
   "q": "Can I copy an example shader from the book into my website?",
   "a": "No. The license forbids using the work in any commercial or non-commercial product, website or project. Learn from it and write your own."
  },
  {
   "q": "Can I mention it in my course or video?",
   "a": "Yes, as teaching material you may link to it with proper credit and show an unchanged screenshot."
  },
  {
   "q": "What do I need to start?",
   "a": "A modern browser with WebGL, such as Chrome, Firefox or Safari, and some coding experience."
  },
  {
   "q": "Where can what I learn be used?",
   "a": "In any place that runs GLSL shaders, such as three.js websites, Processing sketches, openFrameworks apps or mobile games."
  },
  {
   "q": "Is the tool that runs the live examples free to use?",
   "a": "Yes. glslCanvas, the player behind the live examples, is a separate project under the MIT license."
  }
 ],
 "at_a_glance": {
  "latest_version": "0.2.6",
  "last_commit": "2026-02-28",
  "runtime": "The book itself has no package; it is read online. glslCanvas (the player its live examples use) needs a browser with WebGL.",
  "key_needed": false,
  "formats": "glsl"
 },
 "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."
 ],
 "stack_snippets": [],
 "claims": [],
 "checked": {
  "license_read": "2026-11-05",
  "overview_checked": "2026-11-10",
  "numbers_updated": "2026-11-17",
  "sources": [
   {
    "label": "thebookofshaders.com",
    "url": "https://thebookofshaders.com/"
   },
   {
    "label": "thebookofshaders.com/00",
    "url": "https://thebookofshaders.com/00/"
   },
   {
    "label": "thebookofshaders.com/01",
    "url": "https://thebookofshaders.com/01/"
   },
   {
    "label": "thebookofshaders.com/02",
    "url": "https://thebookofshaders.com/02/"
   },
   {
    "label": "thebookofshaders.com/04",
    "url": "https://thebookofshaders.com/04/"
   },
   {
    "label": "thebookofshaders.com/05",
    "url": "https://thebookofshaders.com/05/"
   },
   {
    "label": "thebookofshaders.com/10",
    "url": "https://thebookofshaders.com/10/"
   },
   {
    "label": "thebookofshaders.com/11",
    "url": "https://thebookofshaders.com/11/"
   },
   {
    "label": "thebookofshaders.com/13",
    "url": "https://thebookofshaders.com/13/"
   },
   {
    "label": "thebookofshaders.com/appendix",
    "url": "https://thebookofshaders.com/appendix/"
   },
   {
    "label": "thebookofshaders.com/appendix/00",
    "url": "https://thebookofshaders.com/appendix/00/"
   },
   {
    "label": "thebookofshaders.com/examples",
    "url": "https://thebookofshaders.com/examples/"
   },
   {
    "label": "LICENSE on GitHub",
    "url": "https://github.com/patriciogonzalezvivo/thebookofshaders/blob/master/LICENSE"
   },
   {
    "label": "README on GitHub",
    "url": "https://github.com/patriciogonzalezvivo/thebookofshaders/blob/master/README.md"
   },
   {
    "label": "README on GitHub",
    "url": "https://github.com/patriciogonzalezvivo/glslCanvas/blob/master/README.md"
   },
   {
    "label": "LICENSE on GitHub",
    "url": "https://github.com/patriciogonzalezvivo/glslCanvas/blob/master/LICENSE"
   },
   {
    "label": "npm: glslCanvas/latest",
    "url": "https://registry.npmjs.org/glslCanvas/latest"
   },
   {
    "label": "raw.githubusercontent.com",
    "url": "https://raw.githubusercontent.com/patriciogonzalezvivo/thebookofshaders/master/LICENSE"
   }
  ],
  "unverified": null
 },
 "user_reports": null,
 "url": "https://agentgid.com/assets/the-book-of-shaders/",
 "note": "Written by AgentGid from the official pages in checked.sources; quotes are copied from those pages. status: yes | cond | no | unknown | info. Prices and vendor claims are as reported on the checked date. Not legal advice."
}
