jsocol / indirect3d

The worst pure-software 3D engine ever!

Home Page:http://jamessocol.com/indirect3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add specular lighting

jsocol opened this issue · comments

Specular lighting is an additional lighting component calculated at each vertex that represents how a material may appear brighter or more reflective when the incident angle of the light points it more directly at the camera. It is calculated based on the half-vector between the vectors between the vertex and the light source, and vertex and the camera, respectively.

Not all materials have specular highlights. Highly diffuse materials (think concrete, most cloth, rough wood) do not reflect light coherently enough for specular reflection. Metal, polished wood, ceramic, and other "shiny" materials do.