



















































































































	
	
	



































































































;------------------------------------------------------------------------------
; Defines
;------------------------------------------------------------------------------










;------------------------------------------------------------------------------
; Texture coordinates
;------------------------------------------------------------------------------

; Base texture is the normal map
mul		r0, v3, c94
add		oT0.x, r0.x, c10.w
add		oT0.y, r0.y, c11.w

; Rotate the basis vectors into cubemap space
dp3		oT1.x, r2, c10
dp3		oT1.y, r3, c10
dp3		oT1.z, r1, c10

dp3		oT2.x, r2, c11
dp3		oT2.y, r3, c11
dp3		oT2.z, r1, c11

dp3		oT3.x, r2, c12
dp3		oT3.y, r3, c12
dp3		oT3.z, r1, c12

; Store the eye vector in the texture coordinate w for the pixel shader
dp4		oT1.w, r11, c13
dp4		oT2.w, r11, c14
dp4		oT3.w, r11, c15
