Dot3Demo.java | Class |
DOT3 per-pixel lighting demo.
It uses a Normal map and a Light map, both coded as independent textures.
Each pixel color is a vector coded, where color range [0,255] is mapped
as vector in range [-1.0,+1.0].
A math operation called DOT3 applied to Light vector and Normal vector results
a scalar value, interpreted as light intensity. |