Closed pcercuei closed 1 year ago
@notaz not sure if you want that in your repo too. It didn't apply cleanly on top of your master branch.
almost zero cost
I wonder if this is true for old ARM CPUs as you disabled some ARM specific stuff there.
Try it? I don't have any hardware to test it on.
Unfortunately your change breaks transparencies on ARM when dithering is off:
Seems to be related to MSB_PRESERVED
thing, which is set only on ARM, question is why it doesn't break before your change?
As for performance, it's ~1% hit with dithering on and ~3-4% when off for Crash3 on quite old Cortex-A8, which I'd describe "not great, not terrible" I guess.
But it does break on master as well. I can reproduce it on PC by setting #define MSB_PRESERVED (!CF_DITHER)
.
ARM was doing something different from the fallback then. I can assure you ARM has no issues before your change for both dithering on and off.
Should be working now.
Use a new 'gcol_t' type which fits in 64 bits, and encode each color component into a 8.8 fixed-point format.
This boosts the precision of the gouraud shading algorithm, at almost zero cost.
Fixes #320.