RE: https://mastodon.gamedev.place/@eniko/116232581608004216

instead of dealing with any of that i spent the afternoon refactoring so that i can include my library multiple times with different suffixes. this will be useful for supporting different color bit depths and such without making my code completely impossible to maintain

i was looking at 9 functions

1. flat color
2. gouraud
3. luminance grayscale
4. luminance with color ramp
5. textured
6. textured with flat color
7. textured with gouraud
8. textured with luminance grayscale
9. textured with luminance with color ramp

times 6 color depths (32, 24, 16 555 & 565, 8 332 and 8 bits with CLUT) is 54

(times two for depth buffer is 108)

now instead it can just be one include per desired supported mode

though tbh i'm dubious on the usefulness of 24 bit vs 32 bit color
as you can see the 332 bit rgb 8 bit mode is working perfectly
its ok don't worry i fixed it

ok it's actually looking proper now except that it throws an access violation when i exit so that's probably not an amazing sign

update: i fixed the access violation

you're telling me 3 bits of red/green and 2 bits of blue isn't enough to smoothly gouraud shade a triangle? i'm shocked, shocked!

well. not that shocked

@eniko Just means you need more dither :-)

@eniko When I was writing drivers for 3D cards back in 1997, one thing our card didn't have was MSAA. But we could of course do dumb SSAA - just render 4x bigger, then shrink down.

I figured out we could do the 4x render in 332 with dithering, then when we did the shrink we'd read that but render to 565, because the extra colour bits came from blending the dithered pixels together.

I sent A/B pictures around the office, and nobody could tell the difference, but it was 15% faster. SHIP IT!

@eniko There was one game it didn't work that great for, because it was a game that had almost no textures, just gouraud shading, and they used a lot of blue lighting. And since the scenes were so simple, of course they turned on AA.

Well, you can dither 2 bits all you want, but it's still not going to look great. The developer was impressed by my inventiveness, but I put in an escape to detect his game and switch back to normal 565 for it (yes, "quack.exe" was real - everybody did it)

@TomF @eniko You are a QA nightmare.
@fatlimey @TomF @eniko Gosh, I'm glad those days are behind us! *camera slowly pans over to modern drivers*