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

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

The destripe is for Genesis games primarily, right?

All Sega retro, 32x, and SegaCD, not sure about others (Master System, GG, etc)

1 Like

Best undithering in the business as far as I know. I just learnt how to make them work with crt multipass shaders (namely my beloved easymode halation). Maybe old news for some of you, but good news nonetheless!

1 Like

This shader is able to blend dithering in PSX games?

if it fits the patterns that it looks for, yeah, it should. However, you can turn off dithering in the PSX cores, AFAIK.

1 Like

Is these shaders’ development dead? I’ve noticed some issues in bare knuckle 3 with gdapt.

They’re dead until someone starts working on them again :stuck_out_tongue:

There will always be false-positives/negatives on this sort of heuristic-based detection.

1 Like

This may come off as somewhat strange, but… is it possible to combine mdapt or other dedither shaders with themaister’s NTSC shaders? I tried appending svideo-320 before and after mdapt, but either it behaves as if mdapt wasn’t there or the colors all turn sepia and the screen gets absurdly blurry. I was able to take care of the blur by setting the scale of the 1st NTSC pass to 4-5x, however.

Used GTU combined with s-video for the longest time, but I got kinda motion sick from it. Love the s-video look any way and prefer it for most pre-2000’s systems, just figured I could combine two great things (s-video + mdapt).

this one seems okay to me (runs from ‘dithering’ directory):

shaders = 7

shader0 = shaders/mdapt/passes/mdapt-pass0.slang
filter_linear0 = false
scale_type0 = source
scale0 = 1.0

shader1 = shaders/mdapt/passes/mdapt-pass1.slang
filter_linear1 = false
scale_type1 = source
scale1 = 1.0

shader2 = shaders/mdapt/passes/mdapt-pass2.slang
filter_linear2 = false
scale_type2 = source
scale2 = 1.0

shader3 = shaders/mdapt/passes/mdapt-pass3.slang
filter_linear3 = false
scale_type3 = source
scale3 = 1.0

shader4 = shaders/mdapt/passes/mdapt-pass4.slang
filter_linear4 = false
scale_type4 = source
scale4 = 1.0


shader5 = ../ntsc/shaders/ntsc-adaptive/ntsc-pass1.slang
scale_type5 = source
scale_x5 = 4.0
filter_linear5 = false
scale_y5 = 1.0
float_framebuffer5 = true

shader6 = ../ntsc/shaders/ntsc-adaptive/ntsc-pass2.slang
scale_type6 = source
scale_x6 = 0.5
scale_y6 = 1.0
filter_linear6 = false
2 Likes

That worked pretty well, indeed! Thank you! Never heard of ntsc-adaptive before. Is it themaister’s NTSC shaders combined into an adaptive preset, or something else entirely?

1 Like

Yep, that’s it. It just checks the resolution of the image and either applies the 320 px settings or the 256 px settings.

4 Likes

I recently made a custom GLSL preset by combining mdapt.glslp and scalefx-aa-fast.glslp. I’m extremely happy with the result so that I made it my default shader for 2d pixel games. Then I tried to make the same shader in Slang format for use with the Vulkan video driver tinkering with the Shaders entry in the Quick Menu but I failed miserably. When I apply the shader I receive the “Failed to apply shader preset”" message. I’m not an expert and know nothing about shaders compiling. Help would be appreciated, thanks in advance!

Here’s the GLSL preset:

2 Likes