aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--code/renderer/tr_cmds.c1
-rw-r--r--code/renderer/tr_init.c2
-rw-r--r--code/renderer/tr_shade.c33
3 files changed, 29 insertions, 7 deletions
diff --git a/code/renderer/tr_cmds.c b/code/renderer/tr_cmds.c
index 8986be2..06a18e8 100644
--- a/code/renderer/tr_cmds.c
+++ b/code/renderer/tr_cmds.c
@@ -435,6 +435,7 @@ void RE_BeginFrame( stereoFrame_t stereoFrame ) {
{
// clear both, front and backbuffer.
qglColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+ qglClearColor(0.0f, 0.0f, 0.0f, 1.0f);
qglDrawBuffer(GL_FRONT);
qglClear(GL_COLOR_BUFFER_BIT);
diff --git a/code/renderer/tr_init.c b/code/renderer/tr_init.c
index 0fe686a..d838c61 100644
--- a/code/renderer/tr_init.c
+++ b/code/renderer/tr_init.c
@@ -959,7 +959,7 @@ void R_Register( void )
r_znear = ri.Cvar_Get( "r_znear", "4", CVAR_CHEAT );
AssertCvarRange( r_znear, 0.001f, 200, qtrue );
r_zproj = ri.Cvar_Get( "r_zproj", "64", CVAR_ARCHIVE );
- r_stereoSeparation = ri.Cvar_Get( "r_stereoSeparation", "32", CVAR_ARCHIVE );
+ r_stereoSeparation = ri.Cvar_Get( "r_stereoSeparation", "64", CVAR_ARCHIVE );
r_ignoreGLErrors = ri.Cvar_Get( "r_ignoreGLErrors", "1", CVAR_ARCHIVE );
r_fastsky = ri.Cvar_Get( "r_fastsky", "0", CVAR_ARCHIVE );
r_inGameVideo = ri.Cvar_Get( "r_inGameVideo", "1", CVAR_ARCHIVE );
diff --git a/code/renderer/tr_shade.c b/code/renderer/tr_shade.c
index 8eb60a6..33a7f2b 100644
--- a/code/renderer/tr_shade.c
+++ b/code/renderer/tr_shade.c
@@ -455,9 +455,19 @@ static void ProjectDlightTexture_altivec( void ) {
radius = dl->radius;
scale = 1.0f / radius;
- floatColor[0] = dl->color[0] * 255.0f;
- floatColor[1] = dl->color[1] * 255.0f;
- floatColor[2] = dl->color[2] * 255.0f;
+ if(r_greyscale->integer)
+ {
+ float luminance;
+
+ luminance = (dl->color[0] * 255.0f + dl->color[1] * 255.0f + dl->color[2] * 255.0f) / 3;
+ floatColor[0] = floatColor[1] = floatColor[2] = luminance;
+ }
+ else
+ {
+ floatColor[0] = dl->color[0] * 255.0f;
+ floatColor[1] = dl->color[1] * 255.0f;
+ floatColor[2] = dl->color[2] * 255.0f;
+ }
floatColorVec0 = vec_ld(0, floatColor);
floatColorVec1 = vec_ld(11, floatColor);
floatColorVec0 = vec_perm(floatColorVec0,floatColorVec0,floatColorVecPerm);
@@ -599,9 +609,20 @@ static void ProjectDlightTexture_scalar( void ) {
radius = dl->radius;
scale = 1.0f / radius;
- floatColor[0] = dl->color[0] * 255.0f;
- floatColor[1] = dl->color[1] * 255.0f;
- floatColor[2] = dl->color[2] * 255.0f;
+ if(r_greyscale->integer)
+ {
+ float luminance;
+
+ luminance = (dl->color[0] * 255.0f + dl->color[1] * 255.0f + dl->color[2] * 255.0f) / 3;
+ floatColor[0] = floatColor[1] = floatColor[2] = luminance;
+ }
+ else
+ {
+ floatColor[0] = dl->color[0] * 255.0f;
+ floatColor[1] = dl->color[1] * 255.0f;
+ floatColor[2] = dl->color[2] * 255.0f;
+ }
+
for ( i = 0 ; i < tess.numVertexes ; i++, texCoords += 2, colors += 4 ) {
int clip = 0;
vec3_t dist;