diff options
author | rodri <rgl@antares-labs.eu> | 2023-11-15 17:57:29 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-11-15 17:57:29 +0000 |
commit | 66ce5ae042207689a912bd5b2362905c22d534be (patch) | |
tree | 340830aa965ae01f02021c061dc8d75cbd80d42d | |
parent | c0dd49ba85d180293a6537b7f815df930f8cba15 (diff) | |
download | tinyrend-66ce5ae042207689a912bd5b2362905c22d534be.tar.gz tinyrend-66ce5ae042207689a912bd5b2362905c22d534be.tar.bz2 tinyrend-66ce5ae042207689a912bd5b2362905c22d534be.zip |
correct zfb color rendering.
-rw-r--r-- | main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |