From 66ce5ae042207689a912bd5b2362905c22d534be Mon Sep 17 00:00:00 2001 From: rodri Date: Wed, 15 Nov 2023 17:57:29 +0000 Subject: correct zfb color rendering. --- main.c | 6 +++--- 1 file 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); -- cgit v1.2.3