Open main menu

CDOT Wiki β

Changes

GAM670/DPS905 Weekly Schedule 20111

71 bytes added, 17:48, 2 February 2011
This Week
***: L<sub>d</sub><sub>i</sub> - diffuse color of light i
***: L<sub>s</sub><sub>i</sub> - specular color of light i
***: L<sub>dir</sub>i</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>i</sub>i</sub>)***:: = norm([0,0,1] + L<sub>dir</sub>i</sub>i</sub>) - less computationally intensive - assumes that camera is at infinity along z axis***: p<sub>i</sub> - specular power of light i
***:
*** [http://msdn.microsoft.com/en-us/library/bb172256%28v=VS.85%29.aspx Ambient]
***: C<sub>a</sub> * ( G<sub>a</sub> + sum [L<sub>a</sub>i</sub>i</sub> * Atten<sub>i</sub> * Spot<sub>i</sub>] )
*** [http://msdn.microsoft.com/en-us/library/bb219656%28v=VS.85%29.aspx Diffuse]
***: C<sub>d</sub> * sum [ L<sub>d</sub><sub>i</sub> * (N . L<sub>dir</sub>i</sub>i</sub>) * Atten<sub>i</sub> * Spot<sub>i</sub> ]
*** [http://msdn.microsoft.com/en-us/library/bb147399%28VS.85%29.aspx Specular]
***: C<sub>s</sub> * sum [ L<sub>s</sub><sub>i</sub> * (N . H<sub>i</sub>) <sup>p<sub>i</sub></sup> * 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