



















































































































	
	
	



































































































;------------------------------------------------------------------------------
; Defines
;------------------------------------------------------------------------------





;------------------------------------------------------------------------------
; Texture coordinates
;------------------------------------------------------------------------------

; Base texture is the normal map
mul		oT0.xy, v3, c94

; Transform L vector into texture space and store as a texture stage
add		r6, c10, -r11
dp3		oT1.x, r6, r2
dp3		oT1.y, r6, r3
dp3		oT1.z, r6, r1

; Store per-vertex light attenuation in diffuse alpha
dp3		r4.w, r6, r6					
rsq		r6.w, r4.w
dst		r4, r4.wwww, r6.wwww					
dp3		r4.w, r4, c11
rcp		oD0.a, r4.w
