{"id":13574056,"url":"https://github.com/patriciogonzalezvivo/thebookofshaders","last_synced_at":"2026-01-27T17:34:31.497Z","repository":{"id":28745463,"uuid":"32267301","full_name":"patriciogonzalezvivo/thebookofshaders","owner":"patriciogonzalezvivo","description":"Step-by-step guide through the abstract and complex universe of Fragment Shaders.","archived":false,"fork":false,"pushed_at":"2025-03-04T17:17:01.000Z","size":134871,"stargazers_count":6249,"open_issues_count":64,"forks_count":709,"subscribers_count":231,"default_branch":"master","last_synced_at":"2025-03-17T18:57:27.435Z","etag":null,"topics":["book","fragment-shader","glsl","glsl-editors","glsl-sandbox","glsl-shader","glsl-shaders","shader","shaders","tutorial"],"latest_commit_sha":null,"homepage":"http://TheBookOfShaders.com","language":"GLSL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patriciogonzalezvivo.png","metadata":{"files":{"readme":"README-ch.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["patriciogonzalezvivo"]}},"created_at":"2015-03-15T15:21:14.000Z","updated_at":"2025-03-17T17:58:39.000Z","dependencies_parsed_at":"2024-09-24T23:01:08.238Z","dependency_job_id":"95f7e471-81ed-44ac-8203-9841713c11cc","html_url":"https://github.com/patriciogonzalezvivo/thebookofshaders","commit_stats":{"total_commits":945,"total_committers":142,"mean_commits":6.654929577464789,"dds":0.6507936507936508,"last_synced_commit":"b9d2b44db0564b5f86d3200882d5ec5bfebde2b1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patriciogonzalezvivo%2Fthebookofshaders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patriciogonzalezvivo%2Fthebookofshaders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patriciogonzalezvivo%2Fthebookofshaders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patriciogonzalezvivo%2Fthebookofshaders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patriciogonzalezvivo","download_url":"https://codeload.github.com/patriciogonzalezvivo/thebookofshaders/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245223860,"owners_count":20580361,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["book","fragment-shader","glsl","glsl-editors","glsl-sandbox","glsl-shader","glsl-shaders","shader","shaders","tutorial"],"created_at":"2024-08-01T15:00:45.787Z","updated_at":"2026-01-27T17:34:31.469Z","avatar_url":"https://github.com/patriciogonzalezvivo.png","language":"GLSL","funding_links":["https://github.com/sponsors/patriciogonzalezvivo","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=B5FSVSHGEATCG"],"categories":["GLSL","Recently Updated","Tutorials","Graphics"],"sub_categories":["[Dec 04, 2024](/content/2024/12/04/README.md)","General Learning Material"],"readme":"\u003ccanvas id=\"custom\" class=\"canvas\" data-fragment-url=\"examples/moon.frag\" data-textures=\"examples/images/moon-texture.jpg\" width=\"350px\" height=\"350px\"\u003e\u003c/canvas\u003e\n\n# The Book of Shaders\n*by [Patricio Gonzalez Vivo](http://patriciogonzalezvivo.com/)*\n\n这是一本关于 Fragment Shaders（片段着色器）的入门指南，它将一步一步地带你领略其中的纷繁与抽象。\n\n\u003cdiv class=\"header\"\u003e\n\u003ca href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=B5FSVSHGEATCG\" style=\"float: right;\"\u003e\u003cimg src=\"https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif\" alt=\"\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## 关于翻译\n这本书是 Patricio 的 the Book of Shaders 的中文翻译。我们希望借此将 Shader 这个有趣有益的工具介绍给更多国人。能力所限，不免有误，如有翻译不当，也请多多指出。\n\n感谢 Patricio 对我们的翻译的信任和支持。\n\n## 目录\n\n* [关于这本书](00/?lan=ch)\n\n* 开始\n    * [什么是片段着色器（Fragment Shader）？](01/?lan=ch)\n    * [“Hello world!”](02/?lan=ch)\n    * [Uniforms值](03/?lan=ch)\n    * [运行你的 shader](04/?lan=ch)\n\n* 用算法绘画\n    * [造型函数](05/?lan=ch)\n    * [颜色](06/?lan=ch)\n    * [形状](07/?lan=ch)\n    * [矩阵](08/?lan=ch)\n    * [图案](09/?lan=ch)\n\n* 生成设计\n    * [随机](10/?lan=ch)\n    * [噪声](11/?lan=ch)\n    * [网格噪声](12/?lan=ch)\n    * [分形布朗运动](13/?lan=ch)\n    * 分形\n\n* 图像处理:\n    * 纹理\n    * 图像处理\n    * 卷积核\n    * 滤镜\n    * 其他效果\n\n* 模拟\n    * 乒乓\n    * Conway生命游戏\n    * 水波\n    * 水彩\n    * 反应扩散\n\n* 3D 图形\n    * 灯光\n    * 法线贴图\n    * 凹凸贴图\n    * 光线跟踪（Ray marching）\n    * 环境贴图 (spherical and cube)\n    * 折射和反射\n\n* [附录:](appendix/?lan=ch) 其他阅读本书的方式\n\t* [如何离线阅读此书?](appendix/00/?lan=ch)\n\t* [如何在树莓派上运行示例程序?](appendix/01/?lan=ch)\n\t* [如何打印这本书](appendix/02/?lan=ch)\n\t* [我怎样共创这本书](appendix/03/?lan=ch)\n    * [给那些从JS语言过来的人的介绍](appendix/04/?lan=ch) by [Nicolas Barradeau](http://www.barradeau.com/)\n\n* [example gallery](examples/?lan=ch)\n\n* [词汇表](glossary/?lan=ch)\n\n\n## 关于作者\n\n[Patricio Gonzalez Vivo](http://patriciogonzalezvivo.com/) (1982, 布宜诺斯艾利斯, 阿根廷) 是一个驻地纽约的艺术家、开发者。他致力于探索有机和人造、模拟信号和数字信号、个体和整体之间的空间。他用代码这种富有表达力的语言来创造更美好的事物。\n\nPatricio 研习和实践精神疗法（psychotherapy）和表达性艺术治疗（expressive art therapy）。他毕业于 Parsons 的设计与科技专业，且目前执教于此。目前他作为 Mapzen 的图形开发工程师制作一些开源的 mapping tool。\n\n\u003cdiv class=\"header\"\u003e\u003ca href=\"https://twitter.com/patriciogv\" target=\"_blank\"\u003eTwitter\u003c/a\u003e - \u003ca href=\"https://github.com/patriciogonzalezvivo\" target=\"_blank\"\u003eGitHub\u003c/a\u003e - \u003ca href=\"https://vimeo.com/patriciogv\" target=\"_blank\"\u003eVimeo\u003c/a\u003e - \u003ca href=\"https://www.flickr.com/photos/106950246@N06/\" target=\"_blank\"\u003e Flickr\u003c/a\u003e\u003c/div\u003e\n\n## 关于译者\n\n* [tornote](https://github.com/tornoteli) 翻译 00-05 及第 11 章。\n\n* [Artrustee](https://github.com/Artrustee) 翻译 06-10 章。\n\n后续章节作者仍在撰写中，如果感兴趣可以在 github 上查看部分后续章节代码。\n\n## 致谢\n\n感谢我的妻子 [Jen Lowe](http://www.datatelling.com/), 感谢她无条件的支持、帮助以及编辑此书。\n\n感谢 [Scott Murray](http://alignedleft.com/) 给予的启发和建议。\n\n感谢 [Kenichi Yoneda (Kynd)](https://twitter.com/kyndinfo) 和 [Sawako](https://twitter.com/sawakohome) 的 [日文版翻译(日本語訳)](?lan=jp)\n\n感谢 [Tong Li](https://www.facebook.com/tong.lee.9484) 和 [Yi Zhang](https://www.facebook.com/archer.zetta?pnref=story) 的 [中文版(Chinese)](?lan=ch) 翻译。\n\n感谢 [Jae Hyun Yoo](https://www.facebook.com/fkkcloud) 的 [韩文版 (한국어)](?lan=kr) 翻译。\n\n感谢 Nahuel Coppero (Necsoft) 的 [西班牙语(español)](?lan=es) 翻译。\n\n感谢 [Manoylov Andriy](https://twitter.com/ManoylovAC) 的 [乌克兰语(українська)](?lan=ua) 翻译。\n\n感谢 [Karim Naaji](http://karim.naaji.fr/) 在代码和想法上的支持和贡献。\n\n感谢所有相信这个项目的人[contributed with fixes](https://github.com/patriciogonzalezvivo/thebookofshaders/graphs/contributors) 以及大家的捐赠.\n\n## 获取新的章节\n\n注册以获得最新章节， 或 在 [Twitter](https://twitter.com/bookofshaders) / \u003ca rel=\"me\" href=\"https://mastodon.gamedev.place/@bookofshaders\"\u003eMastodon\u003c/a\u003e / [Discord](shader.zone) 上关注：\n\n\u003cdiv id=\"fd-form-623359074e5181d777e479f9\"\u003e\u003c/div\u003e\n\u003cscript\u003e\n  window.fd('form', {\n    formId: '623359074e5181d777e479f9',\n    containerEl: '#fd-form-623359074e5181d777e479f9'\n  });\n\u003c/script\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatriciogonzalezvivo%2Fthebookofshaders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatriciogonzalezvivo%2Fthebookofshaders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatriciogonzalezvivo%2Fthebookofshaders/lists"}