A new little shader i did (glsl)

Added an experimental mask (10) that you can choose vertical scale (e.g. 5 for 1080 or 6 for 1440 etc), and choose 2 dark, 2 bright pixel positions left and right pixel. It can give nice results.

Added a github link at 1st post with some old versions and other shaders i tweaked

https://mega.nz/file/fzZDySaJ#tHdJwm_UlYHKIIhXNuyoEqNj3LOuoa6G1yGCfyS-L2E

3 Likes

Here is what this method can do at 1440p (with a small modification of code to allow 3x), not bad

1 Like

Here is a little trick, prescaling 2x horizontally before the shader applies it’s linear filter, and that looks much sharper. It’s in presets folder.

https://mega.nz/file/XrhWzJIK#ctmnB3irKjQmGEQsaFJVv5k1iMxlIFcSQfAkv0TUPtU

3 Likes

Just tried it out, that looks nice and it’s a nice trick

2 Likes

I corrected perspective of that 1084-S screenshot, resized to 6x and did a new mask (10) to (try to) simulate that at 1080p. At some time i will push some new changes/cleanup i did to github.

2 Likes

This looks like some stuff I was doing about a year ago. Eventually decided I just didn’t like slotmasks at this low of a resolution, now I exclusively use aperture grille masks at 1080p.

1 Like

It looks ok. It’s not so well defined but at least tries to be a bit faithful. You need 1440p at least for a convincing slot mask.

2 Likes

Very nice shader! I try use it with NES SNES, SMD, PS1 games and result is impressive! Constant mask on all different resolutions is great. And it’s quite bright on 1080p LCD screen with fake 1440p overscan settings. Would be great to have Vulkan version of this shader

2 Likes

Doesn’t it already work on Vulkan?

Ehhh, glsl isn’t really for vulkan. (Like glsl ports to slang/Vulkan pretty easily-ish, but it’s not Vulkan)

I mean there might be a slang version of this shader down now, but ik the thread was originally for a glsl shader.

3 Likes

Well glsl works on all devices, but there is a point. If someone uses vulkan e.g. so he can use latest guest.r shader, he could just switch to this shader hypothetically let’s say for some specific format (say Atari 2600), without needing to change settings, restart etc.

2 Likes

Maybe I don’t know something, but when I setup retroarch driver as Vulkan output in Shaders option only possible load slangp presets not glslp. So I switch driver in retroarch to gl and load your shader preset. PS Your shader is really nice - crisp look an accurate.

2 Likes

Been a while since I posted in this thread, @DariusG this is still my favorite lightweight glsl shader. I went and took another stab at tweaking it:

shaders = "5"
shader0 = "shaders_glsl/sharpen/shaders/fast-sharpen.glsl"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
shader1 = "shaders_glsl/dithering/shaders/gdapt/gdapt-pass0.glsl"
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_glsl/dithering/shaders/gdapt/gdapt-pass1.glsl"
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_glsl/misc/image-adjustment.glsl"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = ""
float_framebuffer3 = "false"
srgb_framebuffer3 = "false"
shader4 = "shaders_glsl/crt/shaders/crt-consumer.glsl"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = ""
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
CONTR = "0.100000"
STEPS = "5.000000"
ia_black_level = "0.020000"
blurx = "0.450000"
blury = "0.250000"
corner = "0.020000"
smoothness = "100.000000"
scanlow = "4.000000"
scanhigh = "6.000000"
beamhigh = "1.250000"
Shadowmask = "6.000000"
slotmask = "0.500000"
slotwidth = "3.000000"
double_slot = "2.000000"
glow = "0.100000"
Size = "0.100000"
sat = "1.000000"
contrast = "1.100000"
WP = "-50.000000"
vignette = "0.000000"

Edit: Tweaked a bit more and it looks like the “Glow Size” parameter acts like a sharpening setting, after lowering that I went from this:

To this:

I posted new settings above, shader also looks smoother with Bilinear Filtering on in the video settings.

Edit 2: I went and sharpened things up a bit more so now it went from this:

To this:

New settings above. You also must have Bilinear Filtering on in the Video settings when using this shader. I use this preset specifically for Yaba Sanshiro and Mupen64plus on my Shield since those two cores are the only ones that run fast in gl driver mode only.

Edit 3: Made some new settings as of 11/16/2022

shaders = "5"
shader0 = "shaders_glsl/sharpen/shaders/adaptive-sharpen.glsl"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
shader1 = "shaders_glsl/dithering/shaders/gdapt/gdapt-pass0.glsl"
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_glsl/dithering/shaders/gdapt/gdapt-pass1.glsl"
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_glsl/misc/image-adjustment.glsl"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = ""
float_framebuffer3 = "false"
srgb_framebuffer3 = "false"
shader4 = "shaders_glsl/crt/shaders/crt-consumer.glsl"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = ""
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
STEPS = "5.000000"
ia_monitor_gamma = "2.500000"
ia_saturation = "1.200000"
ia_luminance = "0.900000"
ia_black_level = "0.010000"
ia_B = "1.050000"
ia_SHARPEN = "1.000000"
blurx = "0.000000"
blury = "0.250000"
corner = "0.020000"
smoothness = "100.000000"
scanlow = "5.000000"
beamhigh = "0.850000"
brightboost2 = "0.800000"
Shadowmask = "6.000000"
slotmask = "0.700000"
slotwidth = "3.000000"
double_slot = "2.000000"
glow = "0.150000"
Size = "0.100000"
sat = "1.000000"
contrast = "1.200000"
WP = "-75.000000"
vignette = "0.000000"
6 Likes

Yeah it looks good, especially on some old formats like 8bit consoles/computers (e.g. Zx spectrum looks really close to an old TV). I use it as default there myself. Personally I think gdv-mini is more sophisticated even if it has less code and is lighter.

2 Likes

Yeah I haven’t used that one in a while, I can’t do Slot Mask the way I want on that one though so that’s a huge pass from me. Gotta have my Slot Mask

Giving extra likes here after trying these shaders out a bit more. Very good considering the light load, while still having some flexibility with the options. Downside here is the restriction to glsl.

3 Likes

Yeah totally, GDV-Mini really looks great and handles non integer scale quite well, all while being fast and only one pass.

I have a version of GDV Mini in slang in the Mega Bezel, I’ll try to get it committed as a regular shader in the repo soon.

@DariusG what would you say the main difference is between Gdv-Mini and crt-consumer?

5 Likes

They use a different filter, crt-consumer tries to emulate an old TV connection like composite, while gdv-mini is more like an arcade monitor. Crt-consumer is heavier with more options too. Some of them, the light ones, migrated to gdv-mini too.

Some formats like NES, SNES or 8bit computers just feel at home with the crt-consumer filter artifacts.

4 Likes

I converted DariusG’s gdv-mini to slang, you can find it in shaders/shaders_slang/crt/crt-gdv-mini.slangp

5 Likes

Could you do the same for CRT-consumer? Edjt: Convert it to slang that is. Glsl doesn’t work on glcore.

1 Like