mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 04:01:17 +00:00
don't try to add contrast to the blend if we don't yet know what contrast is
This commit is contained in:
parent
aed7b1c08d
commit
0bca15c502
1 changed files with 9 additions and 6 deletions
|
@ -87,13 +87,16 @@ V_CalcBlend (void)
|
||||||
a = 1.0 - a3;
|
a = 1.0 - a3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((a2 = 1 - bound (0.0, contrast->value, 1.0)) < 0.999) { // add contrast
|
if (contrast) {
|
||||||
r += (128 - r) * a2;
|
if ((a2 = 1 - bound (0.0, contrast->value, 1.0)) < 0.999) {
|
||||||
g += (128 - g) * a2;
|
// add contrast
|
||||||
b += (128 - b) * a2;
|
r += (128 - r) * a2;
|
||||||
|
g += (128 - g) * a2;
|
||||||
|
b += (128 - b) * a2;
|
||||||
|
|
||||||
a3 = (1.0 - a) * (1.0 - a2);
|
a3 = (1.0 - a) * (1.0 - a2);
|
||||||
a = 1.0 - a3;
|
a = 1.0 - a3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// LordHavoc: saturate color
|
// LordHavoc: saturate color
|
||||||
|
|
Loading…
Reference in a new issue