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

Got the chance to make some screenshots.

This is the actual best result from the original snes9x (dithering is 100% correct and does not affect any other game)

This is with the stock method (forced to absolute pixels 256) - As you can see the transparency effect is gone

This is with gdapt. The error prevention level is highest so that other games like Link to the Past are not affected (font issue). Now it is a mixture of the dithering pattern and the transparency.

I would like to get the result from snes9x. But I have no clue anymore. Kirby should have the transparency. But games like Link to the past or secret of mana should not be affected (font or art chessboard in SoM) Maybe someone has a clue.

This shader does exactly that but it only works on SNES games:

[QUOTE=hunterk;51899]This shader does exactly that but it only works on SNES games: https://github.com/libretro/common-shaders/blob/master/crt/shaders/snes-hires-blend.cg[/QUOTE]

Thanks :slight_smile: there are so many great shaders.

don’t forget, if you wanna add some kind of edge interpolation filter on top of it like xBR or ScaleFX you need to halve the horizontal resolution. otherwise the edge detection doesn’t work properly.

Does spooky fox still post here? unfortunately all the links here with the new filters are dead. I was wondering if anyone could re upload the newer ones in addition do they work on openemu? Ive noticed openemu can read cg files but not the other extensions?

which new filters are you looking for? Everything Cg-related should be in the common-shaders repo:

Hi Hunter, thanks for the quick reply. I saw a bunch of incremental updates made by contributors above, but all their links are dead. I was wondering if those are still available… or all the common shaders there the ones most up to date on that libretto site?

secondly although I know this is a retroarch subsection, does gdapt work on OpenEmu?

supposedly openemu can do gals and cgp but I haven’t been able to get it working. I really like gdapt but prefer the easier interface of openemu

I believe the repo should have the latest versions of everything. I just added a parameter for blending in linear gamma to gdapt, too.

I haven’t used OpenEmu in a long time, so I don’t know how extensive their Cg support is. When I last used it, it only supported a handful of hardcoded shaders.

thanks. I’ve been trying to contact openemu about it to no avail, so I’m hoping if I contact the gdapt creator, maybe I can learn something

That’s Sp00kyFox but I’m not sure he has any experience with OpenEmu, either (I’m assuming not).

Have you tried just loading them in OpenEmu and then seeing what kind of error (if any) pops out?

when I load them into openemu, it only recognizes the passes separately. I think gdapt has two passes. So when I load them, pass 1 just shows the normal look while pass 2 is the blurred one, but it doesn’t combine them.

if all else fails, I might have to bite the bullet and switch to retroarch (I find its interface cumbersome compared to openemu), however I can’t stand playing games blurry, but want that transparent effect like how I remembered it when I owned the real thing.

Ah, yeah, they may not support the metadata necessary to chain the passes.

There are plenty of launchers that can provide a different interface for you to browse games and then you’ll only interact with RetroArch for doing in-game functions.

I’m still here. sorry, I don’t have any experience with OpenEmu. and honestly haven’t looked at the the whole dithering topic anymore. my focus lately was purely on my pixelart interpolation filter ScaleFX. doesn’t mean though that I will pick it up again in the future. but for now I don’t have any new ideas. hope you can figure it out rimpydoo :slight_smile:

Could you please give an example for glsl? :blush:

mdapt and gdapt are both available in GLSL format.

Thank you. I know. I mean, how to adjust the snes hi res shader to apply scalefx on top of it. (Therefore the quote :wink: )

I don’t think snes-hires-blend needs any changes but if scalefx refers to any absolute passes, those would have to be changed to relative references. (for example, “pass 2” would need to be “passprev 4” or whatever instead)

1 Like

You seem to be right. It is not due to snes high res. Independent which shader I use before scaleFX, it is somehow negatively affecting ScaleFX. I added a post in the ScaleFX Thread about that. I have no clue how to solve it.

Would it be possible to modify gdapt to optionally disable vertical line detection? It would work much better for Gameboy games in that case.

@milesrotaru1, try this in replace of pass0, it’s not clean but if it works… https://pastebin.com/5QYrPAGS

Also a I’d like to ask if it’s possible to include the opposite in the official shader repository. I got a the shader modified by Sp00kyFox if I reckon correctly to only do a destripe and not dedither. Here is the pastebin for the .cg and here for the .glsl, the slang modified code should be the same than the .glsl.

1 Like