!!ARBfp1.0 OPTION ARB_precision_hint_fastest; OPTION ARB_fog_linear; ATTRIB dtc = fragment.texcoord[0]; ATTRIB lightdir = fragment.texcoord[1]; PARAM specfactor = 128; PARAM specintensity = program.env[2]; PARAM ambient = program.env[3]; PARAM glowscale = program.env[4]; TEMP diffuse, light; TEX diffuse, dtc, texture[0], 2D; TEMP normal; TEX normal, dtc, texture[3], 2D; SUB normal, normal, 0.5; DP3 normal.w, normal, normal; RSQ normal.w, normal.w; MUL normal.xyz, normal.w, normal; TEMP spec, halfangle; ADD halfangle, lightdir, fragment.texcoord[2]; DP3 halfangle.w, halfangle, halfangle; RSQ halfangle.w, halfangle.w; MUL halfangle.xyz, halfangle.w, halfangle; DP3_SAT spec, halfangle, normal; POW spec, spec.x, specfactor.x; MUL spec, spec, specintensity; DP3_SAT light, normal, lightdir; MUL light.rgb, light, 1.5; MAX light, light, ambient; TEMP masks; TEX masks, dtc, texture[1], 2D; MUL spec, spec, masks.r; MAD light, light, diffuse, spec; MUL light, light, fragment.color; TEMP glow; MUL glow, diffuse, glowscale; LRP light, masks.g, glow, light; TEMP reflect; TEMP camvec, invfresnel, rvects, rvec; DP3 camvec.w, fragment.texcoord[2], fragment.texcoord[2]; RSQ camvec.w, camvec.w; MUL camvec.xyz, camvec.w, fragment.texcoord[2]; DP3 invfresnel, camvec, normal; MUL rvects, invfresnel, normal; MAD rvects, rvects, 2, -camvec; DP3 rvec.x, rvects, fragment.texcoord[3]; DP3 rvec.y, rvects, fragment.texcoord[4]; DP3 rvec.z, rvects, fragment.texcoord[5]; MAX invfresnel, invfresnel, 0; MAD invfresnel, program.env[6].x, invfresnel, program.env[6].y; TEX reflect, rvec, texture[2], CUBE; MUL masks.b, masks.b, invfresnel; LRP result.color, masks.b, reflect, light; MUL result.color.a, diffuse.a, fragment.color.a; END