Search found 6 matches

by tedgreen
Thu 14 Jun, 2018 12:21 am
Forum: Patches
Topic: [Patch] 3dfx rendering accuracy
Replies: 12
Views: 1906

Re: [Patch] 3dfx rendering accuracy

Looking near the bottom where the horizontal purple meets the grey and also the bottom left corner of the green and black it almost looks like there is a y flipping being done.
You could try reversing the order of the colums (I guess y is choosing columns) in the de-dithering matrix.
by tedgreen
Thu 14 Jun, 2018 12:12 am
Forum: Patches
Topic: [Patch] 3dfx rendering accuracy
Replies: 12
Views: 1906

Re: [Patch] 3dfx rendering accuracy

Could you try changing the:
rb += 4;
g += 2;
To:
rb += 0;
g += 0;
and also:
rb += 8;
g += 4;

That should move around the centering of the dithering.
by tedgreen
Wed 13 Jun, 2018 2:48 pm
Forum: Patches
Topic: [Patch] 3dfx rendering accuracy
Replies: 12
Views: 1906

Re: [Patch] 3dfx rendering accuracy

Yeah that definitely doesn't seem right. I have attached a dither subtraction routine that I think better balances the dither removal. I have changed your indexing to use col selection by x and row selection by y. The result using this routine is: The rb (5 bit) 0 value returns values from -3 to 4 b...
by tedgreen
Tue 12 Jun, 2018 9:10 pm
Forum: Patches
Topic: [Patch] 3dfx rendering accuracy
Replies: 12
Views: 1906

Re: [Patch] 3dfx rendering accuracy

Interesting, the formula I gave causes overflow for rb values of 255 (when RGB565 rb =31) but otherwise works out.
by tedgreen
Tue 12 Jun, 2018 8:18 pm
Forum: Patches
Topic: [Patch] 3dfx rendering accuracy
Replies: 12
Views: 1906

Re: [Patch] 3dfx rendering accuracy

So I think in your code you want the following: // Dither subtract value drb= ((int)(15 - dither_matrix_4x4[((y)<<2) + x])>>1); dg= ((int)(15 - dither_matrix_4x4[((y)<<2) + x])>>2); // Add subtract value rb = i + drb; Seems counter intuitive to add the subtract value but I think the math works out. ...
by tedgreen
Tue 12 Jun, 2018 3:53 pm
Forum: Patches
Topic: [Patch] 3dfx rendering accuracy
Replies: 12
Views: 1906

Re: [Patch] 3dfx rendering accuracy

I'm not sure how the current dither_rb/dither_g tables were generated, my dithersub table can't seem to match it, and not even basing the generation off the old dither generation function from years ago can match it I would guess you are missing the conversion to RGB565 that is done after the dithe...