aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-04-27 21:09:03 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-04-27 21:09:03 +0000
commita72f6f27c85222d5646a3cd8077de4d5c5817b80 (patch)
tree1691caf4e17aa967cd35d583f1afbbaa138b068e
parent9b480854604f6d45a71d8c88a6fa21dbcdedc521 (diff)
downloadioquake3-aero-a72f6f27c85222d5646a3cd8077de4d5c5817b80.tar.gz
ioquake3-aero-a72f6f27c85222d5646a3cd8077de4d5c5817b80.zip
- change default value for stereo seperation
- make clearing buffer use black for clearing when changing anaglyphmode - Make sure that dlights are greyscale, too. git-svn-id: svn://svn.icculus.org/quake3/trunk@1331 edf5b092-35ff-0310-97b2-ce42778d08ea
-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;