xps.1.1

tex t0
texbem t1, t0 
texbem t2, t0 
texbem t3, t0  

dp3 r1, v0_bx2, t3_bx2 
mul r1, r1_sat, r1_sat 
mul r1, r1,r1   
mul r0.rgb, v1, t1.a 
+mul r1.a, r1, r1
add r0.rgb, r1_bias.a, r0_bias
mad r0.rgb, t3.a,t1, r0_sat
mad r0.rgb, t2, 1-t3.a, r0

xfc fog.a, r0, fog.rgb, zero, zero, zero, t2.a
