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

Implementing directional and point light

Light can be divided into three types, namely point light, directional light, and spot light. Let's take a look in detail:

  • Point light or positional light: This type of light comes from a fixed position in the 3D space. The position of light and vertices of the object on which it falls is used to calculate the direction of the light. Point light emits light in all directions. Each vertex can have different directions of light, depending on its position from the light source, as shown in the following image.
  • Directional light: This type of light is a special case of the point light. Here, the direction of the light falling on the object is considered as nonvarying. This means that the direction of all the ...

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