Checkerboard-Dedither shader

Great work @Hyllian. Can you do some further testing using PC-Engine and SNES Games as well please if just to fine tune and further put the algorithm through its paces? Lots of PC-Engine games use checkerboard dither patterns and the old blurring methods or even Blargg produces results that don’t look like the sharp composite output PC-Engine is renowned for.

2 Likes

Do you have examples of pc engine that uses dithering?

For SNES, I think this one work ok as the checkerboard are even less than the genesis.

I put a param called “HUD details” that is set to 1.0 and can be increased up to 5.0. If you increase it trim more stray pixels, so you can tweak it for other system or per game.

3 Likes

Of course, off the top of my head,

  • Lords of Thunder - Water level, waterfall
  • Last Alert - Cut scenes
  • Ys Book I & II - Intro
  • Ys IV - Ending
  • Madden - Grass texture
  • Devils Crush - Title Text and some of the bricks in the main table.

These are just a few but unfiltered dithering is a thing I’ve noticed often in PC Engine games, especially the ones that are trying to look more realistic.

I’ll try to add to the list later as I see notice more.

1 Like

It’ll be more helpfull if you post native res screenshots of these game moments.

False positive or false negative will always be a side effect of these kind of filtering. It would need some very advanced AI to separate all true dithering from false ones.

1 Like

No problem, that will have to wait until whenever I get a chance.

Here is one from the Lords of thunder level

2 Likes

I’m sure the checkerboard-dedither can filter that watterfal! The Pattern is standard.

2 Likes

Using my new crt preset that waterfall can be filtered:

Using only checkerboard-dedither:

5 Likes

Wow!

Looks great! Hopefully minimal false positives! I haven’t forgotten about the other examples by the way, just don’t have the time right now to take the screenshots and upload but I would still like to contribute, if only to help test and verify the functionality.

4 Likes

Awesome work @Hyllian !

3 Likes

Its amazing! the results are very clean! I would like an on/off switch for linear gamma blend

3 Likes

Yes, I’ll add that switch in the next version.

BTW, it works well with saturn transparencies:

10 Likes

New release today! Use your RA shader update online to get the latest version.

What’s new:

  • Added more pattern recognition rules;
  • Added new mitigation method for false positives.
  • Added Gamma Slider

The new rule will detect that vertical double line in pic below and filter:

As expected, it worked:

It’ll filter completely sonic blob too:

And more Saturn (include the X-Ray of dithering detection, LOL):

7 Likes

Is there anything that can be done with the “x” in Sonic The Hedgehog or Super Mario World? Maybe tell the filter to ignore if a certain pattern is below a certain number of pixels tall x wide or is below a certain threshold set for amount of repetitions?

Not for now. The second mitigation introduced in the last version is exactly what you’re talking about, it ignores if a dithering pixel isn’t in a horizontal or vertical line of four pixels. If I increase to 5 pixels, it just destroy the detection all over the place, not only in Mario X.

The problem with Mario X (life multiplicator) is that it is exactly like a dithering of 4x4. I didn’t find a way to just ignore this, other than a very specific rule just for this game. And Sonic X is similar.

I could just use some very specific rule to ignore only that little 5x5 region of the screen, but I think it’s too much just for a game.

I’m open to suggestions, though.

6 Likes

Before the version that corrects the dither in Sonic’s bubble shield, and the glass in Panic Puppet’s everything was already beautiful!

This new checkeboard filter seems to better “build” the image behind the dither and shows crisp transparency! Until then maybe only the X in Sonic seemed to have a problem. But despite that the shader seems to be very respectful and even increasing the error prevention the transparency is still consistent!

Well, I think a way to merge the dither into vertical lines doesn’t fit here (obviously), and it would be too demanding of such an amazing job! And the shader name says it all!

But it would be nice to have a shader that allows you to merge Sonic’s waterfall with the same quality as this checkerboard shader.

2 Likes

That’s a task for sgenpt-mix shaders. I think they must be developed separated.

4 Likes

Doesn’t MDAPT already do that? Also, have you tried my Blargg_NTSC_Genesis_Composite_CyberLab_Special_Edition.filt aka Blargg_SNES_Custom_Psuedo_MD_Composite or Blargg_NTSC_Genesis_S-Video_CyberLab_Special_Edition.filt aka Blargg_SNES_Custom_Psuedo_MD_S-Video.filt video filter presets?

2 Likes

This is a tough one, Start Cruiser for the Mega Drive

With checkerboard-dedither makes it look like this, this game went the extra mile with its graphics, stripes and heavy dithering.

2 Likes

I can’t define what’s that texture on those walls. It’s not a regular dithering. Can you show how ntsc shader filter that?

2 Likes