projects
/
dosdemo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e25fd14
)
rt: oops color clamping bug
author
John Tsiombikas
<nuclear@member.fsf.org>
Sun, 8 May 2022 15:14:59 +0000
(18:14 +0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Sun, 8 May 2022 15:16:02 +0000
(18:16 +0300)
src/scr/raytrace.c
patch
|
blob
|
history
diff --git
a/src/scr/raytrace.c
b/src/scr/raytrace.c
index
3d8465f
..
bc9d654
100644
(file)
--- 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;