2D Toolkit Forum

2D Toolkit => Support => Topic started by: dilshod on February 13, 2017, 07:49:14 am

Title: FloydSteinbergDithering bug
Post by: dilshod on February 13, 2017, 07:49:14 am
Hi,
In the FloydSteinbergDithering script, i found lines:
Code: [Select]
case TextureFormat.RGB565:
quantShiftR = 5;
quantShiftB = 6;
quantShiftG = 5;
quantShiftA = 0;
break;

imho, it should be:
Code: [Select]
case TextureFormat.RGB565:
quantShiftR = 3;
quantShiftB = 3;
quantShiftG = 2;
quantShiftA = 0;
break;
Title: Re: FloydSteinbergDithering bug
Post by: unikronsoftware on March 11, 2017, 10:38:57 pm
Hi,

Yes you're right, that was left behind from when it multiplied up and scaled back down as opposed to what its doing now. I will fix that, thanks for the bug report.

ps. Also the RBG order, ugh. How on earth did you find this?
Title: Re: FloydSteinbergDithering bug
Post by: dilshod on March 12, 2017, 03:47:23 am
I was trying different dithering algorithms. I found Sierra Lite gives better dithering compared to others. And making small manipulations on input and output color gives better result.