O'Reilly logo

OpenGL ES 3.0 Cookbook by Parminder Singh

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 5. Light and Materials

In this chapter, we will cover the following recipes:

  • Implementing the per-vertex ambient light component
  • Implementing the per-vertex diffuse light component
  • Implementing the per-vertex specular light component
  • Optimizing the specular light with the halfway vector
  • Gouraud shading – the per-vertex shading technique
  • Phong shading – the per-fragment shading technique
  • Implementing directional and point light
  • Implementing multiple lights in a scene
  • Implementing two-side shading

Introduction

This chapter will introduce the concepts of light and material in 3D graphics. We will understand the concept of light from the aspect of physics and its dual nature. We will discuss the different types of light components, such as ambient, diffuse ...

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