is that any more efficient and bsp-light bug free?

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@206 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-09-14 05:16:04 +00:00
parent e393b9ae3f
commit 847c3d9675
1 changed files with 19 additions and 20 deletions

View File

@ -799,30 +799,29 @@ void PPL_LoadSpecularFragmentProgram(void)
"TEMP diff, spec, nm, ld, cm, gm, lm, dm;\n" "TEMP diff, spec, nm, ld, cm, gm, lm, dm;\n"
"TEX nm.rgb, tm_tc, texture[1], 2D;\n" //t1 = n "TEX nm.rgb, tm_tc, texture[1], 2D;\n"
"TEX ld.rgb, lm_tc, texture[3], 2D;\n" //t2 = l "TEX ld.rgb, lm_tc, texture[3], 2D;\n"
"TEX dm.rgb, tm_tc, texture[0], 2D;\n" //t2 = d "TEX dm.rgb, tm_tc, texture[0], 2D;\n"
"TEX gm.rgb, tm_tc, texture[4], 2D;\n" //t2 = gloss "TEX gm.rgb, tm_tc, texture[4], 2D;\n"
"TEX lm.rgb, lm_tc, texture[2], 2D;\n" //specular = lm "TEX lm.rgb, lm_tc, texture[2], 2D;\n"
"TEX cm.rgb, cm_tc, texture[5], CUBE;\n" //t2 = d "TEX cm.rgb, cm_tc, texture[5], CUBE;\n"
//textures loaded - get diffuse //textures loaded - get diffuse
"MAD nm, nm, 2, negone;\n" "MAD nm.rgb, nm, 2, negone;\n"
"MAD ld, ld, 2, negone;\n" "MAD ld.rgb, ld, 2, negone;\n"
"DP3 diff, nm, ld;\n" //diff = n.l "DP3 diff.rgb, nm, ld;\n"
"MUL diff.rgb, diff, dm;\n" //diff = diff*t2 "MUL diff.rgb, diff, dm;\n"
//diff now contains the entire diffuse part of the equation. //diff now contains the entire diffuse part of the equation.
//time for specular //l 19
//t1 still = n "MAD cm.rgb, cm, 2, negone;\n"
"MAD cm, cm, 2, negone;\n" "DP3 spec.rgb, nm, cm;\n"
"DP3 spec, nm, cm;\n" //spec = t1.t2
"MUL spec, spec, spec;\n" "MUL spec.rgb, spec, spec;\n"
"MUL spec, spec, spec;\n" "MUL spec.rgb, spec, spec;\n"
"MUL spec, spec, spec;\n" "MUL spec.rgb, spec, spec;\n"
"MUL spec, spec, gm;\n" "MUL spec.rgb, spec, gm;\n"
//that's the specular part done. //that's the specular part done.
//we have diffuse and specular - wahoo //we have diffuse and specular - wahoo
@ -1807,8 +1806,8 @@ void PPL_LightBModelTextures(entity_t *e, dlight_t *light)
// for (; s; s=s->texturechain) // for (; s; s=s->texturechain)
{ {
if (s->shadowframe != r_shadowframe) // if (s->shadowframe != r_shadowframe)
continue; // continue;
/* if (fabs(s->center[0] - lightorg[0]) > lightradius+s->radius || /* if (fabs(s->center[0] - lightorg[0]) > lightradius+s->radius ||
fabs(s->center[1] - lightorg[1]) > lightradius+s->radius || fabs(s->center[1] - lightorg[1]) > lightradius+s->radius ||