ps_2_0
def c0, 1, 0, 0, 32
def c2, -0.5, 0, -1, 1.01
dcl v0.rgb
dcl_pp t0.rg
dcl_pp t2.rgb
dcl_pp t3.rgb
dcl_pp t4.rgb
dcl_pp t5.rgb
dcl_pp t6.rgb
dcl_2d s0
dcl_2d s1
texld_pp r0, t0, s0
texld_pp r7, t0, s1
add r0.rgb, r0, c2.r
mul_pp r2.rgb, r0.a, c1
add_pp r9.rgb, r0, r0
dp3_pp r4.r, r9, t2
dp3_pp r4.g, r9, t3
dp3_pp r4.b, r9, t4
dp3 r4.a, r4, r4
rsq r4.a, r4.a
mul_pp r11.rgb, r4, r4.a
mul r6.rgb, r11, c2.a
dp3 r6.a, t5, t5
rsq r6.a, r6.a
mul_pp r1.rgb, r6.a, t5
dp3 r1.a, r6, r1
add r1.a, r1.a, r1.a
mad_pp r10.rgb, r11, r1.a, -r1
dp3_sat r2.a, r11, r1
dp3 r10.a, t6, t6
rsq r10.a, r10.a
mul_pp r5.rgb, r10.a, t6
dp3_sat_pp r6.a, r5, r10
dp3_sat r0.a, r11, r5
log_pp r1.a, r6.a
mul r8.a, r1.a, c0.a
exp_pp r3.a, r8.a
min_pp r5.a, r3.a, c0.r
mov_pp r11.a, -r0.a
cmp_pp r9.a, r11.a, c2.g, r5.a
mul_pp r2.rgb, r2, r9.a
mul_pp r0.rgb, r7, c1
add_pp r2.a, r0.a, r2.a
rcp_pp r2.a, r2.a
add_pp r1.a, r2.a, c2.b
cmp_pp r2.a, r1.a, c0.r, r2.a
mul_pp r0.a, r0.a, r2.a
mul_sat_pp r5.rgb, r7, v0
mov_pp r3.a, r7.a
mad_pp r11.rgb, r0, r0.a, r5
add_pp r3.rgb, r2, r11
mov_pp oC0, r3
end