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

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

Slang ScaleFx needs pass aliases:

shaders = "12"
shader0 = "shaders_slang/dithering/shaders/mdapt/passes/mdapt-pass0.slang"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "shaders_slang/dithering/shaders/mdapt/passes/mdapt-pass1.slang"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = ""
float_framebuffer1 = "false"
srgb_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "1.000000"
scale_type_y1 = "source"
scale_y1 = "1.000000"
shader2 = "shaders_slang/dithering/shaders/mdapt/passes/mdapt-pass2.slang"
filter_linear2 = "false"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = ""
float_framebuffer2 = "false"
srgb_framebuffer2 = "false"
scale_type_x2 = "source"
scale_x2 = "1.000000"
scale_type_y2 = "source"
scale_y2 = "1.000000"
shader3 = "shaders_slang/dithering/shaders/mdapt/passes/mdapt-pass3.slang"
filter_linear3 = "false"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = ""
float_framebuffer3 = "false"
srgb_framebuffer3 = "false"
scale_type_x3 = "source"
scale_x3 = "1.000000"
scale_type_y3 = "source"
scale_y3 = "1.000000"
shader4 = "shaders_slang/dithering/shaders/mdapt/passes/mdapt-pass4.slang"
filter_linear4 = "false"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "refpass"
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
scale_type_x4 = "source"
scale_x4 = "1.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/scalefx/shaders/scalefx-pass0.slang"
filter_linear5 = "false"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = scalefx_pass0
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "source"
scale_x5 = "1.000000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/scalefx/shaders/scalefx-pass1.slang"
filter_linear6 = "false"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = ""
float_framebuffer6 = "false"
srgb_framebuffer6 = "false"
scale_type_x6 = "source"
scale_x6 = "1.000000"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "shaders_slang/scalefx/shaders/scalefx-pass2.slang"
filter_linear7 = "false"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = ""
float_framebuffer7 = "false"
srgb_framebuffer7 = "false"
scale_type_x7 = "source"
scale_x7 = "1.000000"
scale_type_y7 = "source"
scale_y7 = "1.000000"
shader8 = "shaders_slang/scalefx/shaders/scalefx-pass3.slang"
filter_linear8 = "false"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = ""
float_framebuffer8 = "false"
srgb_framebuffer8 = "false"
scale_type_x8 = "source"
scale_x8 = "1.000000"
scale_type_y8 = "source"
scale_y8 = "1.000000"
shader9 = "shaders_slang/scalefx/shaders/scalefx-pass4.slang"
filter_linear9 = "false"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = ""
float_framebuffer9 = "false"
srgb_framebuffer9 = "false"
scale_type_x9 = "source"
scale_x9 = "3.000000"
scale_type_y9 = "source"
scale_y9 = "3.000000"
shader10 = "shaders_slang/anti-aliasing/shaders/fxaa.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = ""
float_framebuffer10 = "false"
srgb_framebuffer10 = "false"
scale_type_x10 = "source"
scale_x10 = "1.000000"
scale_type_y10 = "source"
scale_y10 = "1.000000"
shader11 = "shaders_slang/anti-aliasing/shaders/aa-shader-4.0-level2/aa-shader-4.0-level2-pass2.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "false"
alias11 = ""
float_framebuffer11 = "false"
srgb_framebuffer11 = "false"
scale_type_x11 = "source"
scale_x11 = "1.000000"
scale_type_y11 = "source"
scale_y11 = "1.000000"
parameters = "MODE;PWR;VL_LO;VL_HI;CB_LO;CB_HI;VL;CB;DEBUG;linear_gamma;SFX_CLR;SFX_SAA;SFX_SCN;AAOFFSET2"
MODE = "0.000000"
PWR = "2.000000"
VL_LO = "1.250000"
VL_HI = "1.750000"
CB_LO = "5.250000"
CB_HI = "5.750000"
VL = "0.000000"
CB = "1.000000"
DEBUG = "0.000000"
linear_gamma = "0.000000"
SFX_CLR = "0.500000"
SFX_SAA = "1.000000"
SFX_SCN = "1.000000"
AAOFFSET2 = "0.500000"
3 Likes

Thanks, works perfectly.

Hunterk you are always helpful and attentive with people posting and asking for advice, even if they are complete noobs. That’s appreciated and really help the community.

3 Likes

My pleasure :slight_smile: I’m glad I could help, and I appreciate the kind words

2 Likes