summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 3c26cb7..1d7ab4b 100644
--- a/main.c
+++ b/main.c
@@ -488,9 +488,9 @@ modelshader(Sparams *sp)
zbuf[sp->p.x+sp->p.y*Dx(fb->r)] = z;
cbuf[0] = 0xFF;
- cbuf[1] = 0xFF*z;
- cbuf[2] = 0xFF*z;
- cbuf[3] = 0xFF*z;
+ cbuf[1] = 0xFF*fabs(z);
+ cbuf[2] = 0xFF*fabs(z);
+ cbuf[3] = 0xFF*fabs(z);
memfillcolor(sp->frag, *(ulong*)cbuf);
pixel(zfb, sp->p, sp->frag);