



















































































































	
	
	



































































































;------------------------------------------------------------------------------
; Geometry transform
;------------------------------------------------------------------------------

; Calculate bone indices 
mad		r7, v14, c23.x, c23.y

; Initialize w-coordinate
mov		r0.w, c1

; Calculate the second bone weight from the first
sub		r8.x, c1, v15.x

; Skin position by bone 0
mov	a0.x, r7.x
m4x3	r0.xyz, v0, c[a0.x]
mul		r11, r0, v15.x

; Skin position by bone 1
mov	a0.x, r7.y
m4x3	r0.xyz, v0, c[a0.x]
mad		r11, r0, r8.x, r11

; Skin normal by bone 0
mov	a0.x, r7.x
m3x3	r1.xyz, v1, c[a0.x]
dp3 r4.w, r1, r1 rsq r1.w, r4.w mul r1.xyz, r1, r1.w

; Transform skinned position to projection space
m4x4	oPos, r11, c6

