“My favorite book on the topic is The Book of Shaders (free) and I'd highly recommend you mess around with it”
The Book of Shaders 由 Patricio Gonzalez Vivo 和 Jen Lowe 写成,从零讲解片段着色器(fragment shader)。每个例子都嵌在网页里,可以直接改代码并实时看到结果,内容涵盖形状、随机、噪声、图案等基本构件。它偏向创意编程和数学可视化,不是系统的图形学教材。这本书还没有写完,只有部分章节。
HN 上最常见的说法是它是学着色器的最佳起点:带交互式环境,能教会你着色器的基本构件,之后再学光线步进等内容。
想入门着色器和创意编程的初学者
怎么读
由 Claude 根据这本书和 HN 上的说法整理,可能有错- 1从头按章节读,每个例子都在页面里改参数试一试
- 2遇到数学函数多做可视化,加深直觉
- 3读完基础后再转向 ShaderToy 或 WebGL 项目
- 4想用 Python 实践可参考评论提到的 Glumpy
HN 书评
推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算“The Book of Shaders. A step by step introduction into fragment shaders. [5]”
“Take a look at these sources for absolute beginners.”
“An excellent tutorial is at The Book of Shaders”
“These are some good resources to get started with graphics/games”
“The Book Of Shaders uses this to good effect:”
看全部 20 条 →
“Along with The Book of Shaders was been very helpful on giving me a foundation for shader programming.”
“This also seems promising, though I only skimmed over it: The Book of Shaders”
“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.”
“which I really recommend, VERY good source for learning, helped me a lot!”
“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.”
“(And a big +1 on the recommendation)”
“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”
“For anyone else similarly interested in learning to do CG from scratch (particularly on the web), some other great resources I've found are:”
“I tend to recommend that people start with The Book of Shaders [0].”
“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.”
“It's all done with shaders. A good starting point is The Book of Shaders.”
“and a good sandbox is (链接)”
“I found "The Book of Shaders" to be an absolutely amazing resource for learning about what shaders do from a very basic level.”
“I'll see if I can dig up a couple resources from my own foray drop them in this comment below.”