Mdapt & gdapt - dithering treatment [Updated 06/06/14]

hmm, something isn’t working right with your shader (at least I don’t think the result is intended). I made some screenshots:

if you need further help testing, I’d suggest we’ll do it in your xBR thread.

Thank you. Those glitches are the same I’m getting on PS3. So I think I have to do some tests myself and if I can’t find the answer, then I’ll post another test in the xBR thread later.

Adde the latest mdapt (4-passes) to the repository:

https://github.com/libretro/common-shaders/tree/master/dithering/mdapt-4p

I took out pseudo transparencies because of too much false positives. It’s very good with dithering, though!

Included are two presets, one for pure mdapt and another combined with xBR. It works very well with capcom games, specially SFA3.

Without ‘and pseudo transparency,’ it’s just ‘md.cg,’ right? :stuck_out_tongue:

j/k

This version works much better for me than the previous one. The lifebar transparency in XMen:COTA is glorious:

Kkkk. Actually, I disabled vertical and horizontal line detection. They’re responsible for pseudo transparencies in genesis games. (see sonic waterfall).

Not crazy about xbr, but loving the dithering blending.

Is there going to be an attempt at tackling the kind of full screen checkerboard dithering found in many ps1 or n64 games? Silent Hill specifically is what I’m thinking about. I always recommend people play that on real hardware on a CRT TV, since it’s very difficult to set that game up right via emulation. The dithering is one aspect. Usually it’s turned off, which lightens the colors in the game, making them paler, or it’s unblended.

Also be aware there’s a page on dithering on the Emulation Wiki, with a sub section for this very shader. Feel free to review or edit it

1 Like

That screenshot comparison is strange. It seems there’s more than just dithering happening.

Look at the window, it doesn’t exist in the dithered one!

For us dummies :wink: , could you please include a link for this UPDATED filter in a compiled format? (on my mac I just can’t get github to download properly)

In any case, does this play better with text? The original MDAPT on this forum works well with dithering but creates artifacts with text, etc.

Enter the main repo page and look for a button at the right side of the screen with “Download ZIP”. All shaders will be downloaded for you.

Main repo page: https://github.com/libretro/common-shaders

Also, this new combo doesn’t treat pseudo transparencies (sonic waterfall), but is much better at dithering than the old one. Besides, it is better at dealing with fonts.

@pleiades7bluestars EDIT: ninja’ed, but here’s a helpful pic for finding the zip button:

What image should be added to the Dithering wiki page? I’d like something that shows off the latest version. No xbr, since that’s another shader, and I just want to show off the dithering shader itself. I was thinking of using an image from the thread, but those are probably older versions.

I didn’t take it. I don’t know what emulator or settings were used.

I took some shots yesterday and uploaded here: imgur.com/a/tQT0k

look for the two SFA3 pics with and without mdapt.

I made a GIF out of those SFA3 pics: EDIT: I also wrote a blog post about mdapt and the other dedithering shaders a while back, if you want to link it/them.

Wow, you fixed the dithering adapt! Thank you SO much for this!! In many ways, this was the last missing piece of the puzzle for me.

Thank you… Thank you… Thank you…

It’s created a new dilemma for me though… :-/ haha…

I really REALLY love your original BETA 5xBRdilation filter (since it gets things ‘just’ right on most games in terms of sharpness…) In other words, it’s JUST sharp enough to be perfect, something I’ve always wanted. That’s why I like it so much. It’s very balanced…especially on older HDTVs like mine that seem to be a bit blurry than i’d like.

However I’m now in love with your new four pass dither filter…so…

The problem I have when trying to COMBINE the four pass dither WITH the 5xBRdilation is that it’s a touch too slow…still very playable, but just slow enough to be annoying for an OCD guy like me…lol…

Yes, I did try the 4-pass-XbrC filter preset and while it looks great it seems to lack just that extra little bit of sharpness that makes the beta 5xBRdilation so perfect.

I know you made the separate dilation one pass filter to enhance the other XBR but for whatever reason it just doesn’t look as good as that beta 5xBRdilation that you first put on there IMHO. Not sure what you did there but beta or not it’s close to perfect as perfect can be IMHO. Maybe it’s a happy accident but it’s worth another look, it really gets things right…

That said, If you have any plans to go back and rework 5xBRdilation so it’s not as slow, that would be awesome!!! I’m not sure how this all works so I’m not sure if that’s even possible to optimize it so it runs faster. I dont know how to code so I’m not sure what went into all that but it really does the trick. Kudos to you for that.

Like I said, to be able to add ‘dithering’ to that would be a match made in heaven (which creates a heavenly look, despite the not so pleasant speed constraint).

So…for me the perfect ideal filter COMBO at this point would be: -mdapt dither pass 1 NEAREST X1 -mdapt dither pass 2 NEAREST X1 -mdapt dither pass 3 NEAREST X1 -mdapt dither pass 4 NEAREST X1 -5xBRdilation NEAREST NOTHING

This is what I’m using now for most things…

In fact, as far as the cores go, it works great with GBAnext, okay with T16 (and CDs), and a little slow with Arcade and Genesis (playable but just slow enough to be a little annoying).

Again, this is just my 2 cents and I’m no programmer so I’m coming at all this as strictly a novice. But in a perfect world (for me, at least), fixing that old beta 5xBRdilation filter to run ‘a touch faster’ is the Holy Grail for me and Im sure alot of retro enthusiasts that are a fan of your work. So I hope it’s okay that I shared my opinion about all this.

You’ve done some remarkable work and I’m surprised the guys at Sony haven’t called you yet asking what your secret recipe is for their lame attempts to add HD filters to their re-releases when so many of them are bad (your’s are superior).

If you take donations, you should post a link since it’s a shame you are not getting paid for this. Your work is truly remarkable and breathes new life into these old games.

Well, thanx for everything. Think of this post as a glorified wish list for his obsessed OCD retro ethusiast here looking for the ‘perfect look’ on his game. I feel like I’m a couple of frame rates away (in terms of speed) to getting where I want to be in all of this and I’m grateful to you for your hardwork. Know that it doesn’t go unnoticed.

P.S. Thanks for also showing me how to download all that from the repo. Much appreciated. :slight_smile: Ciao.

Sorry to point this, but the credit must be given to the right person.

mdapt is an original idea from Spookyfox, not me. As I like it too much, I try to optimize it to work well on most RA platforms.

Yes, I know. I have some ideas to optimize it.

Can you take two game screens showing why you think xBRdilation is better than xbr separated from dilation.cg? I really don’t know the reason as the multipass version do the ideal dilation.

Ok, download these two files (a shader and a cgp) and put insided xbr-lv2-multipass folder in your Retroarch. Load this cgp and see if the speed is good and sharpness.

https://anonfiles.com/file/f8a73f74c43498aa5c741790c2696638

Okay, having played with this some more…

This is REALLY another good shader mix. :slight_smile: Thanx for that.

I’m finding this is good for older arcade FB games and cartoony games. They really needed this. Some games like “Double Dragon Advance” really shine with this as well.

If some type of dither fix was also incorporated into this, then that would be a dream. But by itself it does fine.

Basically I divide my needs up into three camps when improving games:

(1)Classic games that were just fine the way they were but benefit from an HD makeover (like arcade Ghost and Goblins). This new combo seems perfect for that. Even without any filters, these games rock but the fresh coat of paint brings them into the HD age just fine.

(2)Restore/fix classic games that are outdated now (like classic Genesis games which really show their age). For that the combo that works best is a 6 pass combo: -Mdapt pass1 Nearest x1 -Mdapt pass2 Nearest x1 -Mdapt pass3 Nearest x1 -Mdapt pass4 Nearest x1 -xBR5dilation Nearest x1 -x2scalerplus (spelling?) NONE NONE

The slight variation in that set up fixes the speed problem for me with that Beta filter you made. Of course, if you ever release an optimized version 2 of that xBR5dilation then I’m all for it. :wink: But for now, this is my work around since it does speed it up some.

(3) Salvage hopeless games. Let’s be honest. Some games, no what kind of filter you use, can’t be saved. But I go the retro route and use a lot of CRT type effects. But some of the scanline filters by themselves, as good as they are, just don’t feel right to me so instead I came up with this six pass combo…

-Mdapt pass1 Nearest x1 -Mdapt pass2 Nearest x1 -Mdapt pass3 Nearest x1 -Mdapt pass4 Nearest x1 -xBR5dilation Nearest x3 -Scanline NONE NONE

Doing this seems to restore a tactile feel to the games and some of these games, as bad as they look now, seem to benefit from the balanced scanline effect and some HD type look. It’s hard to describe but some of these games are too two-dimensional in their makeup. So this combo adds a third dimension with the scanline effect I use.

I will try to post some pictures if that will give you an idea of what I’m seeing here. But basically that xBRdilation filter in it’s beta form works wonders in this combo of mine. Maybe the intent you had for it is different than what it is doing for me. But like all great art, inventions, etc., maybe that happy accident was a gift in disguise.

Basically this is all a longwinded way of saying that if you ever went back to that original beta xBRdilation filter and made a faster version 2 of it by optimizing it somehow, then I would in heaven. It looks fine the way it is and it’s an useful tool for applications I use it for. Just needs to be a little faster.

In any case, thanks for ANOTHER great tool with that new preset. It’s aNother nice little thing to put into my arsenal.

Let me know if you ever plan to create an optimized v2 of that xBR5dilation filter. :wink: I’m willing to donate $$$ if that’s an incentive (if you do that sorta thing). I think it’s better than you think and I will post pictures if it helps to see where I’m coming from.

Finally, thanx for all your hard work. For people who ‘get it’, this is what the retro scene is REALLY about.

If you are curious, I make RetroXMB games so the different presets are useful since I can tailor each .pkg with the best possible look so that they will start up directly on the XMB looking good without the user being forced to configure it themselves (which take me out of the experience a little).

Thanx again. X-D

I’ll answer your questions in the other thread (xBR), as it’s not a mdapt issue.

mdapt optimized in common-shaders now.

Quick clarication: Is this the same 4 pass mdapt shader you already posted a week ago? Or is this an optimized FASTER version of that?

As always, thx for your hard work!