O'Reilly logo

OpenGL® Programming Guide: The Official Guide to Learning OpenGL®, Version 4.5 with SPIR-V, Ninth Edition by Dave Shreiner, Graham Sellers, John Kessenich

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 2. Shader Fundamentals

Chapter Objectives

After reading this chapter, you’ll be able to do the following:

• Identify the various types of shaders that OpenGL uses to create images.

• Construct and compile shaders using the OpenGL Shading Language.

• Pass data into shaders using a variety of mechanisms available in OpenGL.

• Employ advanced GLSL shading capabilities to make shaders more reusable.

This chapter introduces shaders and explains how to use them with OpenGL. Along the way, we describe the OpenGL Shading Language (commonly called GLSL), and detail how shaders will influence your OpenGL applications.

This chapter contains the following major sections:

• “Shaders and OpenGL” discusses programmable graphics shaders in the context ...

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