mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 23:12:24 +00:00
Seems the clamp was required
This commit is contained in:
parent
9bbd09b78f
commit
43562c94d0
2 changed files with 8 additions and 0 deletions
|
@ -547,6 +547,10 @@ void BlendColorColormap(int y, int x0, int x1, PolyTriangleThreadData* thread)
|
|||
g = (startG + ((gray * rangeG) >> 8)) << 1;
|
||||
b = (startB + ((gray * rangeB) >> 8)) << 1;
|
||||
|
||||
r = MIN(r, (uint32_t)255);
|
||||
g = MIN(g, (uint32_t)255);
|
||||
b = MIN(b, (uint32_t)255);
|
||||
|
||||
line[x] = MAKEARGB(a, r, g, b);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -561,6 +561,10 @@ static void MainFP(int x0, int x1, PolyTriangleThreadData* thread)
|
|||
g = (startG + ((gray * rangeG) >> 8)) << 1;
|
||||
b = (startB + ((gray * rangeB) >> 8)) << 1;
|
||||
|
||||
r = MIN(r, (uint32_t)255);
|
||||
g = MIN(g, (uint32_t)255);
|
||||
b = MIN(b, (uint32_t)255);
|
||||
|
||||
fragcolor[x] = MAKEARGB(a, r, g, b);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue