按年被提到
20162019 · 9 次2026
开源书›图形与游戏·No.40

The Book of Shaders

着色器之书
Patricio Gonzalez Vivo, Jen Lowe

交互式入门 GLSL 片段着色器,用代码画图

免费阅读 ↗
被推荐 · 49 人未写完首次 2016-04-08 · 最近 2026-09-18官方免费在线(版权保留,作者或出版社免费放出)

这本书还没写完,官网上能读的是已经写好的部分。

49不同的人
42活跃月份
25有推荐的月份
49讨论串

The Book of Shaders 由 Patricio Gonzalez Vivo 和 Jen Lowe 写成,从零讲解片段着色器(fragment shader)。每个例子都嵌在网页里,可以直接改代码并实时看到结果,内容涵盖形状、随机、噪声、图案等基本构件。它偏向创意编程和数学可视化,不是系统的图形学教材。这本书还没有写完,只有部分章节。

HN 为什么推荐它

HN 上最常见的说法是它是学着色器的最佳起点:带交互式环境,能教会你着色器的基本构件,之后再学光线步进等内容。

难度 2 / 5约 20 小时
适合谁

想入门着色器和创意编程的初学者

读之前最好知道
1基础编程概念
2中学数学

怎么读

由 Claude 根据这本书和 HN 上的说法整理,可能有错
  1. 1从头按章节读,每个例子都在页面里改参数试一试
  2. 2遇到数学函数多做可视化,加深直觉
  3. 3读完基础后再转向 ShaderToy 或 WebGL 项目
  4. 4想用 Python 实践可参考评论提到的 Glumpy

HN 书评

推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算
强烈推荐formalsystem · 2019-11

“My favorite book on the topic is The Book of Shaders (free) and I'd highly recommend you mess around with it”

称它是自己最爱的 shader 入门书,且免费,建议动手玩
Molten Bismuth Shader原评论 ↗
推荐TACIXAT · 2016-05

“The Book of Shaders. A step by step introduction into fragment shaders. [5]”

推荐它作为 fragment shader 的循序渐进入门
Scratchapixel: Computer Graphics Programming from Scratch原评论 ↗
推荐cpcat · 2016-06

“Take a look at these sources for absolute beginners.”

推荐它给完全的初学者,作为 GPU 编程的起点
Ask HN: Best place to learn GPU programing?原评论 ↗
推荐oveddan · 2017-01

“An excellent tutorial is at The Book of Shaders”

推荐它,用 shader 可视化画图来学数学
Ask HN: Programming to learn math?原评论 ↗
推荐adamnemecek · 2017-01

“These are some good resources to get started with graphics/games”

把它列为入门图形和游戏编程的好资源
A trip down the League of Legends graphics pipeline原评论 ↗
推荐roywiggins · 2017-03

“The Book Of Shaders uses this to good effect:”

拿它说明可运行的代码片段能把课程讲得很好
Show HN: A new way of blogging about Lua原评论 ↗
看全部 20 条 →
推荐HammadB · 2017-10

“Along with The Book of Shaders was been very helpful on giving me a foundation for shader programming.”

称它对打下 shader 编程的基础很有帮助
Show HN: WebGL Voxel Engine原评论 ↗
推荐lbebber · 2018-11

“This also seems promising, though I only skimmed over it: The Book of Shaders”

只粗读过,觉得它是有希望的 shader 入门
Making rain simulation as real as possible原评论 ↗
推荐cimi_ · 2019-01

“I enjoyed going through The Book of Shaders[1] by Patricio Gonzalez Vivo. It comes with an interactive programming environment that's great if you're just getting started.”

推荐它,自带交互式编程环境,适合刚入门的人
How to Start Learning Computer Graphics Programming原评论 ↗
推荐mgzme · 2019-05

“which I really recommend, VERY good source for learning, helped me a lot!”

强烈推荐它,是学 shader 的很好来源
Show HN: ShaderLab – My WebGL Social Network原评论 ↗
推荐hsaliak · 2019-10

“Glumpy, which is used in this tutorial -(链接), is IMO the best way to work through The Book of Shaders in python for a deeper understanding of fragment shaders.”

建议用 Glumpy 在 Python 里学它,深入理解 fragment shader
Python and OpenGL for Scientific Visualization原评论 ↗
推荐paulgb · 2019-11

“(And a big +1 on the recommendation)”

附议推荐它,称其技术写作平易近人
Interactive Linear Algebra原评论 ↗
推荐haxiomic · 2020-08

“If you like this sort of thing and want to learn more about it I recommend checking out (链接) for more demos and The Book of Shaders for tutorials”

推荐用它的教程来学 shader 技巧
WebGL Fluid Experiment (2014)原评论 ↗
推荐wyqydsyq · 2021-02

“For anyone else similarly interested in learning to do CG from scratch (particularly on the web), some other great resources I've found are:”

把它列为从零学计算机图形学(尤其是 web 上)的资源
Computer Graphics from Scratch原评论 ↗
推荐theschwa · 2021-02

“I tend to recommend that people start with The Book of Shaders [0].”

常推荐别人从它开始学图形编程
Graphics Programming Weekly原评论 ↗
推荐dorkwood · 2021-04

“A good place for beginners to start is The Book of Shaders[0]. It doesn't mention raymarching specifically, but it will give you the building blocks to understand it later.”

推荐初学者先读它,打好日后理解 raymarching 的基础
Condition: A 64KB WebGL Intro原评论 ↗
推荐onion2k · 2021-06

“It's all done with shaders. A good starting point is The Book of Shaders.”

推荐它作为 shader 绘画技术的入门起点
Fluid Paint原评论 ↗
推荐high_byte · 2021-09

“and a good sandbox is (链接)”

推荐它作为玩 OpenGL shader 的教程
Visualize 3D hyperbolic honeycombs and sphere packings原评论 ↗
推荐CobrastanJorji · 2022-11

“I found "The Book of Shaders" to be an absolutely amazing resource for learning about what shaders do from a very basic level.”

称它是从最基础讲 shader 作用的绝佳资源
Ask HN: Do you recall any book or course that made a topic finally click?原评论 ↗
推荐CSSer · 2023-04

“I'll see if I can dig up a couple resources from my own foray drop them in this comment below.”

把它列入学 WebGL 和 shader 的资源
Show HN: Unknown Pleasures, a tiny web experiment with WebGL原评论 ↗