1
0
Fork 0
forked from fte/fteqw

limit gl_overbright to 1x/2x/4x

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3783 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2011-04-26 16:10:16 +00:00
parent 5edcd6c0e8
commit 6d062f1355

View file

@ -2239,7 +2239,16 @@ static void DrawPass(const shaderpass_t *pass)
qglTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); qglTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE);
qglTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); qglTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB);
qglTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); qglTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE);
qglTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, gl_overbright.value+1); {
float o;
if (gl_overbright.value >= 2)
o = 4.0;
else if (gl_overbright.value >= 1)
o = 2.0;
else
o = 1.0;
qglTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, o);
}
break; break;
default: default:
case PBM_MODULATE: case PBM_MODULATE: