154
edits
Changes
→This Week
***: C<sub>s</sub> - material specular color
***: Atten<sub>i</sub> - attenuation of light i
****:: Atten<sub>i</sub> = 1/(a<sub>0</sub> + a<sub>1</sub> d<sub>i</sub> + a<sub>2</sub> d<sub>i</sub><sup>2</sup>)****:: Atten<sub>i</sub> = [0, 1]****:: d<sub>i</sub> - distance from light i
***: Spot<sub>i</sub> - spot factor of light i
***: L<sub>a</sub><sub>i</sub> - ambient color of light i
***: N - normal to the surface at the vertex
***: H<sub>i</sub> - halfway vector =
****:: = norm(norm(Camera<sub>position</sub> - Vertex<sub>position</sub>) + L<sub>dir</sub><sub>i</sub>)****:: = norm([0,0,1] + L<sub>dir</sub><sub>i</sub>) - less computationally intensive - assumes that camera is at infinity along z axis
***:
*** Ambient