#include "..\..\VertexShader.h" ;------------------------------------------------------------------------------ ; Defines ;------------------------------------------------------------------------------ #define C_EYE_POSITION c16 ;------------------------------------------------------------------------------ ; Lighting calculation ;------------------------------------------------------------------------------ ; Initialize diffuse color mov oD0.xyz, C_MATERIAL_COLOR ; Compute the normalized vertex to eye vector add rVertexToEye, C_EYE_POSITION, -pPos NormalizeVector(rVertexToEye) ; Store 1 - E-dot-N in diffuse alpha dp3 rTemp.x, pNormal, rVertexToEye add oD0.w, C_ONE.x, -rTemp.x