O'Reilly logo

OpenGL SuperBible: Comprehensive Tutorial and Reference, Fourth Edition by Nicholas Haemel, Benjamin Lipchak, Richard S. Wright

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 16. Vertex Shading: Do-It-Yourself Transform, Lighting, and Texgen

by Benjamin Lipchak

WHAT YOU’LL LEARN IN THIS CHAPTER:

• How to perform per-vertex lighting

• How to generate texture coordinates

How to calculate per-vertex fog

How to calculate per-vertex point size

• How to squash and stretch objects

How to make realistic skin with vertex blending

This chapter is devoted to the application of vertex shaders. We covered the basic mechanics of OpenGL Shading Language (GLSL) shaders in the preceding chapter, but at some point you have to put the textbook down and start learning by doing. Here, we introduce a handful of shaders that perform various real-world tasks. You are encouraged to use these shaders as a starting point for ...

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