



















































































































	
	
	



































































































;------------------------------------------------------------------------------
; Defines
;------------------------------------------------------------------------------






;------------------------------------------------------------------------------
; Texture coordinates
;------------------------------------------------------------------------------

; Calculate the vertex-to-light vector
add		r6, c10, -r11

; For light attenuation, store scaled and biased vertex-to-light vector in texture stages
mul		r4, r6, c11
mad		oT0.xy, r4.xy, c12, c12
mad		oT1.x, r4.z, c12, c12
mov		oT1.y, c12

; Store L vector as a texture stage
mov		oT2, r6

; Copy lightmap texcoords
mul		oT3.xy, v5, c94

; Store N vector in the specular channel
mad		oD1.xyz, r1, c12, c12
