mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 10:35:11 -04:00
Fix R/G/B not being clamped in Gradient_Blend
This commit is contained in:
parent
5513d49b85
commit
060afd7d7b
@ -234,9 +234,9 @@ void Gradient_Blend(Bitmap* bmp, BitmapCol col, int blend,
|
||||
|
||||
for (xx = 0; xx < width; xx++, dst++) {
|
||||
/* TODO: Not shift when multiplying */
|
||||
R = BitmapCol_R(col) + (BitmapCol_R(*dst) * blend) / 255;
|
||||
G = BitmapCol_G(col) + (BitmapCol_G(*dst) * blend) / 255;
|
||||
B = BitmapCol_B(col) + (BitmapCol_B(*dst) * blend) / 255;
|
||||
R = BitmapCol_R(col) + (BitmapCol_R(*dst) * blend) / 255; Drawer2D_ClampPixel(R);
|
||||
G = BitmapCol_G(col) + (BitmapCol_G(*dst) * blend) / 255; Drawer2D_ClampPixel(G);
|
||||
B = BitmapCol_B(col) + (BitmapCol_B(*dst) * blend) / 255; Drawer2D_ClampPixel(B);
|
||||
|
||||
*dst = BitmapCol_Make(R, G, B, 255);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user