mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 21:51:09 +00:00
- change default value for stereo seperation
- make clearing buffer use black for clearing when changing anaglyphmode - Make sure that dlights are greyscale, too.
This commit is contained in:
parent
ae08d1a6d8
commit
1156a63d52
3 changed files with 29 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -455,9 +455,19 @@ static void ProjectDlightTexture_altivec( void ) {
|
|||
radius = dl->radius;
|
||||
scale = 1.0f / radius;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue