- Implement stereo rendering with anaglyph images.
- Add r_greyscale for black&white rendering
This commit is contained in:
parent
48d9999698
commit
425c351d1b
12 changed files with 435 additions and 128 deletions
|
@ -938,6 +938,18 @@ static void ComputeColors( shaderStage_t *pStage )
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if in greyscale rendering mode turn all color values into greyscale.
|
||||
if(r_greyscale->integer)
|
||||
{
|
||||
int scale;
|
||||
|
||||
for(i = 0; i < tess.numVertexes; i++)
|
||||
{
|
||||
scale = (tess.svars.colors[i][0] + tess.svars.colors[i][1] + tess.svars.colors[i][2]) / 3;
|
||||
tess.svars.colors[i][0] = tess.svars.colors[i][1] = tess.svars.colors[i][2] = scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue