O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Graphics Shaders, 2nd Edition

Book Description

Graphics Shaders: Theory and Practice is intended for a second course in computer graphics at the undergraduate or graduate level, introducing shader programming in general, but focusing on the GLSL shading language. While teaching how to write programmable shaders, the authors also teach and reinforce the fundamentals of computer graphics. The second edition has been updated to incorporate changes in the OpenGL API (OpenGL 4.x and GLSL 4.x0) and also has a chapter on the new tessellation shaders, including many practical examples.

The book starts with a quick review of the graphics pipeline, emphasizing features that are rarely taught in introductory courses, but are immediately exposed in shader work. It then covers shader-specific theory for vertex, tessellation, geometry, and fragment shaders using the GLSL 4.x0 shading language. The text also introduces the freely available glman tool that enables you to develop, test, and tune shaders separately from the applications that will use them. The authors explore how shaders can be used to support a wide variety of applications and present examples of shaders in 3D geometry, scientific visualization, geometry morphing, algorithmic art, and more.

Features of the Second Edition:

  • Written using the most recent specification releases (OpenGL 4.x and GLSL 4.x0) including code examples brought up-to-date with the current standard of the GLSL language.
  • More examples and more exercises
  • A chapter on tessellation shaders
  • An expanded Serious Fun chapter with examples that illustrate using shaders to produce fun effects
  • A discussion of how to handle the major changes occurring in the OpenGL standard, and some C++ classes to help you manage that transition

The authors thoroughly explain the concepts, use sample code to describe details of the concepts, and then challenge you to extend the examples. They provide sample source code for many of the book’s examples at www.cgeducation.org

Table of Contents

  1. Front Cover
  2. Dedication
  3. Contents (1/3)
  4. Contents (2/3)
  5. Contents (3/3)
  6. Foreword
  7. Preface (1/2)
  8. Preface (2/2)
  9. 1. The Fixed-Function Graphics Pipeline (1/5)
  10. 1. The Fixed-Function Graphics Pipeline (2/5)
  11. 1. The Fixed-Function Graphics Pipeline (3/5)
  12. 1. The Fixed-Function Graphics Pipeline (4/5)
  13. 1. The Fixed-Function Graphics Pipeline (5/5)
  14. 2. OpenGL Shader Evolution (1/3)
  15. 2. OpenGL Shader Evolution (2/3)
  16. 2. OpenGL Shader Evolution (3/3)
  17. 3. Fundamental Shader Concepts (1/6)
  18. 3. Fundamental Shader Concepts (2/6)
  19. 3. Fundamental Shader Concepts (3/6)
  20. 3. Fundamental Shader Concepts (4/6)
  21. 3. Fundamental Shader Concepts (5/6)
  22. 3. Fundamental Shader Concepts (6/6)
  23. 4. Using glman (1/5)
  24. 4. Using glman (2/5)
  25. 4. Using glman (3/5)
  26. 4. Using glman (4/5)
  27. 4. Using glman (5/5)
  28. 5. The GLSL Shader Language (1/7)
  29. 5. The GLSL Shader Language (2/7)
  30. 5. The GLSL Shader Language (3/7)
  31. 5. The GLSL Shader Language (4/7)
  32. 5. The GLSL Shader Language (5/7)
  33. 5. The GLSL Shader Language (6/7)
  34. 5. The GLSL Shader Language (7/7)
  35. 6. Lighting (1/4)
  36. 6. Lighting (2/4)
  37. 6. Lighting (3/4)
  38. 6. Lighting (4/4)
  39. 7. Vertex Shaders (1/4)
  40. 7. Vertex Shaders (2/4)
  41. 7. Vertex Shaders (3/4)
  42. 7. Vertex Shaders (4/4)
  43. 8. Fragment Shaders and Surface Appearance (1/5)
  44. 8. Fragment Shaders and Surface Appearance (2/5)
  45. 8. Fragment Shaders and Surface Appearance (3/5)
  46. 8. Fragment Shaders and Surface Appearance (4/5)
  47. 8. Fragment Shaders and Surface Appearance (5/5)
  48. 9. Surface Textures in the Fragment Shader (1/7)
  49. 9. Surface Textures in the Fragment Shader (2/7)
  50. 9. Surface Textures in the Fragment Shader (3/7)
  51. 9. Surface Textures in the Fragment Shader (4/7)
  52. 9. Surface Textures in the Fragment Shader (5/7)
  53. 9. Surface Textures in the Fragment Shader (6/7)
  54. 9. Surface Textures in the Fragment Shader (7/7)
  55. 10. Noise (1/6)
  56. 10. Noise (2/6)
  57. 10. Noise (3/6)
  58. 10. Noise (4/6)
  59. 10. Noise (5/6)
  60. 10. Noise (6/6)
  61. 11. Image Manipulation with Shaders (1/11)
  62. 11. Image Manipulation with Shaders (2/11)
  63. 11. Image Manipulation with Shaders (3/11)
  64. 11. Image Manipulation with Shaders (4/11)
  65. 11. Image Manipulation with Shaders (5/11)
  66. 11. Image Manipulation with Shaders (6/11)
  67. 11. Image Manipulation with Shaders (7/11)
  68. 11. Image Manipulation with Shaders (8/11)
  69. 11. Image Manipulation with Shaders (9/11)
  70. 11. Image Manipulation with Shaders (10/11)
  71. 11. Image Manipulation with Shaders (11/11)
  72. 12. Geometry Shader Concepts and Examples (1/5)
  73. 12. Geometry Shader Concepts and Examples (2/5)
  74. 12. Geometry Shader Concepts and Examples (3/5)
  75. 12. Geometry Shader Concepts and Examples (4/5)
  76. 12. Geometry Shader Concepts and Examples (5/5)
  77. 13. Tessellation Shaders (1/8)
  78. 13. Tessellation Shaders (2/8)
  79. 13. Tessellation Shaders (3/8)
  80. 13. Tessellation Shaders (4/8)
  81. 13. Tessellation Shaders (5/8)
  82. 13. Tessellation Shaders (6/8)
  83. 13. Tessellation Shaders (7/8)
  84. 13. Tessellation Shaders (8/8)
  85. 14. The GLSL API (1/5)
  86. 14. The GLSL API (2/5)
  87. 14. The GLSL API (3/5)
  88. 14. The GLSL API (4/5)
  89. 14. The GLSL API (5/5)
  90. 15. Using Shaders for Scientific Visualization (1/10)
  91. 15. Using Shaders for Scientific Visualization (2/10)
  92. 15. Using Shaders for Scientific Visualization (3/10)
  93. 15. Using Shaders for Scientific Visualization (4/10)
  94. 15. Using Shaders for Scientific Visualization (5/10)
  95. 15. Using Shaders for Scientific Visualization (6/10)
  96. 15. Using Shaders for Scientific Visualization (7/10)
  97. 15. Using Shaders for Scientific Visualization (8/10)
  98. 15. Using Shaders for Scientific Visualization (9/10)
  99. 15. Using Shaders for Scientific Visualization (10/10)
  100. 16. Serious Fun (1/8)
  101. 16. Serious Fun (2/8)
  102. 16. Serious Fun (3/8)
  103. 16. Serious Fun (4/8)
  104. 16. Serious Fun (5/8)
  105. 16. Serious Fun (6/8)
  106. 16. Serious Fun (7/8)
  107. 16. Serious Fun (8/8)
  108. Appendices (1/4)
  109. Appendices (2/4)
  110. Appendices (3/4)
  111. Appendices (4/4)
  112. References