Seems the clamp was required

This commit is contained in:
Magnus Norddahl 2020-01-18 12:55:36 +01:00
parent 9bbd09b78f
commit 43562c94d0
2 changed files with 8 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}