WebGL Programming Guide cover

WebGL Programming Guide

Rating 4.5
Word count
640 words
Chapters
13
ISBN
9787121229428

Tags

Summary

The WebGL Programming Guide is a technical tutorial that systematically explains the native WebGL API and the fundamentals of 3D graphics. The original English edition is WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL; it was translated by Xie Guanglei and published by Publishing House of Electronics Industry in June 2014, totaling about 640,000 characters over 500 pages. The book follows a "run the example first, then understand the principle" approach, beginning with the relationship between WebGL and HTML5 canvas and guiding readers through a complete practical path: clearing the drawing area, drawing a point, drawing a triangle, then colored polygons, textures, lighting, hierarchical models, and even shadows and post-processing effects. Core topics include how the WebGL rendering pipeline and shaders work; writing vertex and fragment shaders; the purposes and differences of attribute, uniform, and varying variables; matrix transformations and combining model, view, and perspective matrices; the GLSL ES shading language; color buffers, depth testing, and alpha blending; texture mapping and multiple textures; and using offscreen framebuffers for picking operations and selecting objects in a scene with the mouse. Most examples come in paired HTML and JavaScript files that readers can run directly in a browser and experiment with using the companion source code. The end of the book discusses advanced topics such as fog, framebuffer rendering, normal mapping, and point sprites, plus a complete integrated virtual-scene case. The book presupposes little mathematical background for 3D graphics concepts and serves as a systematic introduction to WebGL from beginner to intermediate level.

Editor's review

WebGL 是浏览器中直接绘制三维图形的接口,也是前端图形学、数据可视化、3D 展示等方向的底层基础。市面上关于 WebGL 的书不少,但真正把“原生 API 讲透 + 示例可跑 + 图形学概念讲清楚”这三件事同时做到的并不多,本书是其中口碑较为稳定的一本。 它最大的优点是节奏清晰:从清空画布、画一个点这样几乎是“最小可运行程序”的例子出发,一步步推进到纹理、光照、层次模型和帧缓冲拾取,每个新概念出现时都有对应的可运行代码,读者不会在一开始就被渲染管线、坐标系转换和着色器语法淹没。它没有过早依赖 Three.js 等封装库,而是让读者直接面对 gl.drawArrays、缓冲区对象、矩阵和着色器,这对理解后续上层框架的行为方式很有帮助。 译者是国内前端工程师,译文对 WebGL、GLSL 术语的处理比较得当,配套源码也便于对照书页逐段实验。适合放在案边,边敲边读,属于“读完一遍还要反复翻代码”的那类技术书。

Who it's for

A good fit for

  • 有 HTML/JavaScript 基础的 Web 前端开发者,想系统学习三维图形
  • 希望理解 Three.js 等三维库底层原理、不满足于只会调 API 的工程师
  • 需要做数据可视化、3D 产品展示、网页小游戏的开发者
  • 计算机、数字媒体相关专业学生,作为图形学入门实践教材

Not a good fit for

  • 完全没有编程基础、尚未写过 JavaScript 的读者
  • 只想找一个开箱即用的三维框架、不愿接触原生 API 的人
  • 期待覆盖 WebGL 2.0 新特性与最新 GPU 技术、需要前沿内容的读者

Reading tips

  1. 务必边读边敲:把书中每个示例在自己的编辑器里跑一遍,再改动参数观察画面变化,效果远好于只读代码。
  2. 遇到矩阵变换和坐标系时先接受结论、动手调参,等做过光照和相机章节后再回头推导,理解会更顺。
  3. 配合线性代数基础(向量、矩阵乘法、齐次坐标)同步补充,建议把常见变换矩阵手写一遍。
  4. 读完前六章即可着手做一个小项目(如旋转立方体、带纹理的模型展示),用项目反推薄弱环节。

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. Chapter 1 Overview of WebGL
  2. Chapter 2 Getting Started with WebGL
  3. Chapter 3 Drawing and Transforming Triangles
  4. Chapter 4 Advanced Transformations and Animation Basics
  5. Chapter 5 Colors and Textures
  6. Chapter 6 The Shading Language (GLSL ES)
  7. Chapter 7 Entering the 3D World
  8. Chapter 8 Lighting
  9. Chapter 9 Hierarchical Models
  10. Chapter 10 Advanced Techniques
  11. Appendix A Sample Programs and Code
  12. Appendix B Reference on Matrix Transformations and Coordinate Systems
  13. Appendix C WebGL Compared with Other Technologies

FAQ

这本书和清华大学出版社2013年的同名书是同一本吗?
不是。2013年清华大学出版社那本《WebGL编程指南》作者为 Diego Cantor 与 Brandon Jones,译者为李强,原著是 WebGL Beginner's Guide;流传更广、豆瓣评分约 9.0 的是电子工业出版社 2014 年出版、谢光磊翻译、Kouichi Matsuda 与 Rodger Lea 合著的版本。
零基础可以直接读吗?
不建议完全零基础。书中默认读者会写 HTML 和 JavaScript,从第2章起就进入着色器代码。如果没写过 JS,建议先用一两周补基础语法和 DOM 操作,再开始读。
这本书讲 WebGL 2.0 吗?
本书以 WebGL 1.0 与 GLSL ES 1.00 为基础展开,未系统覆盖 WebGL 2.0 的新增特性。学完本书后,可以对照 WebGL 2.0 规范补充纹理数组、变换反馈、实例化等新内容。
书中的示例代码能直接运行吗?
示例多为成对的 HTML 与 JavaScript 文件,用浏览器打开即可运行,部分示例可能需要通过本地服务器加载纹理等资源,以避免跨域限制。建议配合官方配套源码逐章练习。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

Kouichi Matsuda is a technical author in the fields of computer graphics and Web front-end development, whose name appears in the Chinese book database as the author of WebGL Programming Guide. Beyond this book, public information about his nationality, dates of birth and death, education, professional positions, and awards is limited and cannot be verified, so no speculation is made here. Judging from the available work, his writing centers on WebGL, a browser-based 3D graphics interface, and is aimed at developers who wish to enter real-time graphics rendering; the content emphasizes explanations of principles alongside workable code examples, balancing conceptual overview with practical guidance. The book is used by Chinese technical readers as an introductory reference for learning WebGL and is commonly categorized under computing, image and video, and programming design, reflecting a focus on graphics programming and front-end visualization.

Rodger Lea Author

Rodger Lea is an author about whom limited public information is available; only one of his works, the WebGL Programming Guide, is currently listed in our catalog. This work indicates that his writing centers on computer graphics and programming design, aimed at developers who want to use WebGL to create three-dimensional graphics and interactive effects in the browser. The WebGL Programming Guide focuses on graphics rendering and programming practice, and belongs to the practical technical field where computing intersects with image and video, making it suitable for readers with some programming background who wish to gain a systematic understanding of WebGL. Because details such as the author's nationality, birth and death years, education, and professional career remain unclear, this introduction can only be based on the work itself, and other biographical details await more public information.