Describe the bug (REQUIRED)
RGBA 16bpp images are dithered with different algorithm in 1.2.180. Overall quality is lower than before.
To Reproduce (REQUIRED)
Look at two demos:
Expected behavior (REQUIRED)
"RGBA 16bpp" images should be dithered with the same algo as before.
Defold version (REQUIRED):
Minimal repro case project (OPTIONAL):
https://github.com/aglitchman/defold-basis-quality-test
This is a real problem as we have a large number of graphics in 16 bit. Other formats are not suitable because there is no alpha, and the RGBA32 format still takes up too much space (twice as much as 16 bit).
When it comes to 8K atlases, this is important!



I agree, and I'll look into it now.
The biggest issue was that I had completely overlooked the dithering, and hadn't replaced it with something similar.
The original lib we used was PVRTexLib, which always was a pain to maintain for all our platforms, and it had served its purpose since it wasn't updated to produce any modern formats anymore. Only use case now was to produce dithered 16 bit images.
Here we implement the Interleaved gradient noise to produce the dithering.
Only thing is that I'm perhaps not completely satisfied with the result for the alpha channel in the "circle image".
But if we figure out which dithering algorithm we wish to replace with, it shouldn't be very hard to do.
(see texc_private.cpp)
Reading materials for the interested:
Shadertoy:
Testbed:
Comparisons:
The result is a tad different, both 179 and 181beta produces the same type of banding, just in slightly different places.
And the 179 version has slightly more banding (e.g. in the logo images). But I think they're more or less the same.
179

180

181 beta

Here the alpha banding artifacts are slightly more pronounced in the 181beta I think.
I don't particularly like the 179 version either, but I think it might be slightly "smoother"
179

180

181 beta

In any case, this is ready to go into the beta, as a first fix (since we didn't have any dithering at all!).
If necessary, let's continue the discussion here to figure out what needs to be improved as a step 2.
That's a great solution. I am completely satisfied.
Most helpful comment
The biggest issue was that I had completely overlooked the dithering, and hadn't replaced it with something similar.
The original lib we used was PVRTexLib, which always was a pain to maintain for all our platforms, and it had served its purpose since it wasn't updated to produce any modern formats anymore. Only use case now was to produce dithered 16 bit images.
Here we implement the Interleaved gradient noise to produce the dithering.
Only thing is that I'm perhaps not completely satisfied with the result for the alpha channel in the "circle image".
But if we figure out which dithering algorithm we wish to replace with, it shouldn't be very hard to do.
(see texc_private.cpp)
Reading materials for the interested:
Shadertoy:
Testbed:
Comparisons:
The result is a tad different, both 179 and 181beta produces the same type of banding, just in slightly different places.
And the 179 version has slightly more banding (e.g. in the logo images). But I think they're more or less the same.
179

180

181 beta

Here the alpha banding artifacts are slightly more pronounced in the 181beta I think.
I don't particularly like the 179 version either, but I think it might be slightly "smoother"
179

180

181 beta

In any case, this is ready to go into the beta, as a first fix (since we didn't have any dithering at all!).
If necessary, let's continue the discussion here to figure out what needs to be improved as a step 2.