O'Reilly logo

OpenGL Shading Language, Third Edition by Mike Weiblen, Hugh Malan, Barthold Lichtenbelt, John M. Kessenich, Dan Ginsburg, Bill Licea-Kane, Randi J. Rost

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 19. Shaders for Imaging

In this chapter, we describe shaders whose primary function is to operate on two-dimensional images rather than on three-dimensional geometric primitives.

A fragment shader can be used to process texture values read from a texture map. We can divide imaging operations into two broad categories: those that require access to a single pixel at a time and those that require access to multiple pixels at a time. With the OpenGL Shading Language, you can easily implement in a fragment shader the imaging operations that require access to only a single pixel at a time. Operations that require access to multiple pixels at a time require that the image first be stored in texture memory. You can then access the image multiple ...

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