Open main menu

CDOT Wiki β

Changes

GAM670/DPS905 Weekly Schedule 20111

55 bytes added, 17:40, 2 February 2011
This Week
***: L<sub>dir</sub><sub>i</sub> - direction vector 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
***: C<sub>a</sub> * ( G<sub>a</sub> + sum [AttenL<sub>a</sub><sub>i</sub> * LAtten<sub>ai</sub>* Spot<sub>i</sub>] )
*** Diffuse
***: C<sub>d</sub> * sum [ L<sub>d</sub><sub>i</sub> * (N . L<sub>dir</sub><sub>i</sub>) * Atten<sub>i</sub> * Spot<sub>i</sub> ]
*** Specular
***: C<sub>s</sub> * sum [ L<sub>s</sub><sub>i</sub> * (N . H<sub>i</sub>) * Atten<sub>i</sub> * Spot<sub>i</sub> ]
** [http://msdn.microsoft.com/en-us/library/ff471376%28v=vs.85%29.aspx HLSL Intrinsic Functions]
*** [http://msdn.microsoft.com/en-us/library/bb509630%28v=vs.85%29.aspx normalize()] - normalize a vector