From: John Tsiombikas Date: Sun, 8 May 2022 15:14:59 +0000 (+0300) Subject: rt: oops color clamping bug X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=commitdiff_plain;h=e23b27a06797d931992ab9b8d21055f789371e2a rt: oops color clamping bug --- diff --git a/src/scr/raytrace.c b/src/scr/raytrace.c index 3d8465f..bc9d654 100644 --- a/src/scr/raytrace.c +++ b/src/scr/raytrace.c @@ -84,9 +84,9 @@ static void draw(void) cgm_vcons(&ray.origin, 0, 0, -5); if(ray_trace(&ray, &scn, 0, &col)) { - r = cround64(col.x * 255.0f) & 0xff; - g = cround64(col.y * 255.0f) & 0xff; - b = cround64(col.z * 255.0f) & 0xff; + r = cround64(col.x * 255.0f); + g = cround64(col.y * 255.0f); + b = cround64(col.z * 255.0f); if(r > 255) r = 255; if(g > 255) g = 255; if(b > 255) b = 255;