WebGL - Picking objects with Lighting

In this episode, I discuss how to fix picking an object when there's lighting present in WebGL.
Concepts:
  • Lighting
  • Surface color by diffuse reflection = light color base color of surface cos A
  • Diffuse reflection = reflection differs by light position
  • Angle(A) = between the light and surface
  • Surface color by ambient reflection = light color base color of surface
  • Ambient reflection = same reflection at any position
  • Surface color by diffuse and ambient reflection = surface color by diffuse + surface color by ambient

Resources:
  • https://github.com/davidwparker/programmingtil-webgl/tree/master/0074-lighting-part-3-picking
© programmingtil.com