renderergl2: reimplement greyscale as backend post after all 2D+3D draws
Fixes #654 - HUD/UI previously bypassed greyscale. r_greyscale now supports partial desaturation [0-1]. Removed unused legacy logic from tr_shade.c
This commit is contained in:
1 parent
7bd2c17f9d
commit
453705553b
9 files changed
+166
-111
No files matched your search
@@ -722,20 +722,6 @@ static void ComputeShaderColors( shaderStage_t *pStage, vec4_t baseColor, vec4_t
|
||||
break;
|
||||
}
|
||||
|
||||
// FIXME: find some way to implement this.
|
||||
#if 0
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user