O'Reilly logo

OpenGL SuperBible: Comprehensive Tutorial and Reference, Fifth Edition by Jr. Richard S. Wright, Benjamin Lipchak, Graham Sellers, Nicholas Haemel

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

Chapter 6Thinking Outside the Box: Nonstock Shaders

by Richard S. Wright, Jr.

What You’ll Learn in this Chapter:

• How to write your own shaders that work with GLBatch

• About the different GLSL variable types

• About GLSL’s built-in functions

• How to roll your own lighting shaders

• How to use one- and two-dimensional textures in GLSL

• How to chisel out individual fragments

In Chapter 3, “Basic Rendering,” you were first introduced to shaders and how to use them. If you skipped it to get right into shader programming, you really need to review that chapter first and make sure you understand how we use attributes and uniforms, and how we pass them into a shader from our client-side code. In that chapter we focused our attention entirely on ...

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

Start Free Trial

No credit card required