

































































































































































































;------------------------------------------------------------------------------
; Defines
;------------------------------------------------------------------------------




;------------------------------------------------------------------------------
; Diffuse color
;------------------------------------------------------------------------------

; Compute the normalized vertex to eye vector
add		r7, c10, -r11
dp3 r4.w, r7, r7 rsq r7.w, r4.w mul r7.xyz, r7, r7.w

; Dot with vertex normal and take absolute value
dp3		r5.x, r1, r7
max		r5.x, r5.x, -r5.x
max		r5.x, r5.x, c0.x

; Modulate with constant diffuse alpha
mov     oD0.rgb, c2
mul		oD0.a, r5.x, c2
