while we’re at it, can you also combine sharp-bilinear-scanlines with the code from dotmask whenever it’s convenient for you?
I’m trying to find a lightweight solution for adding scanlines and a mask to PSX games while also dealing with those pesky non-integer scale scaling artifacts. There are lots of ways to tackle this problem. Another option would be to merge pixellate or sharp-bilinear with zfast_crt+dotmask, although this might mess with the adjustable blur in zfast. Unfortunately, my shader skills are stuck at an intermediate level and I don’t know how to go about doing this.
Ideally, the combined shader would eliminate/hide scaling artifacts, add scanlines and mask, and provide adjustable blur/sharpness.
Also: Is there anything like a guide to writing shaders, and/or a good online IDE for working on/editing shaders?
It seems increasingly unlikely that the problem of multiple in-game resolutions being scaled to the same resolution with PSX emulators will ever be addressed (I’ve had an issue open on Github for months), so this is the next best solution.
EDIT: got the following result using pixellate + image-adjustment + zfast_CRT. This is pretty good, I’d say, as far as dealing with the scaling artifacts and adding scanlines and adjustable sharpness. Unfortunately, however, I wasn’t able to get any of the Lottes masks to look good. The Lottes masks always seem to produce artifacts when the horizontal scale isn’t a multiple of 3. I’d be happy to know if anyone can improve on this.
No shaders:
Preset:
alias0 = ""
alias1 = ""
alias2 = ""
BLURSCALEX = "0.300000"
BRIGHTBOOST = "1.250000"
feedback_pass = "0"
filter_linear2 = "true"
float_framebuffer0 = "false"
float_framebuffer1 = "false"
float_framebuffer2 = "false"
HILUMSCAN = "8.000000"
ia_B = "1.000000"
ia_black_level = "0.000000"
ia_BOTMASK = "0.000000"
ia_bright_boost = "0.000000"
ia_contrast = "1.000000"
ia_FLIP_HORZ = "0.000000"
ia_FLIP_VERT = "0.000000"
ia_G = "1.000000"
ia_GRAIN_STR = "0.000000"
ia_LMASK = "0.000000"
ia_luminance = "1.000000"
ia_monitor_gamma = "2.200000"
ia_overscan_percent_x = "0.000000"
ia_overscan_percent_y = "0.000000"
ia_R = "1.000000"
ia_RMASK = "0.000000"
ia_saturation = "1.000000"
ia_SHARPEN = "0.000000"
ia_target_gamma = "2.200000"
ia_TOPMASK = "0.000000"
ia_XPOS = "0.000000"
ia_YPOS = "0.000000"
ia_ZOOM = "1.000000"
INTERPOLATE_IN_LINEAR_GAMMA = "1.000000"
LOWLUMSCAN = "9.000000"
MASK_DARK = "0.000000"
MASK_FADE = "0.000000"
mipmap_input0 = "false"
mipmap_input1 = "false"
mipmap_input2 = "false"
parameters = "INTERPOLATE_IN_LINEAR_GAMMA;ia_target_gamma;ia_monitor_gamma;ia_overscan_percent_x;ia_overscan_percent_y;ia_saturation;ia_contrast;ia_luminance;ia_black_level;ia_bright_boost;ia_R;ia_G;ia_B;ia_ZOOM;ia_XPOS;ia_YPOS;ia_TOPMASK;ia_BOTMASK;ia_LMASK;ia_RMASK;ia_GRAIN_STR;ia_SHARPEN;ia_FLIP_HORZ;ia_FLIP_VERT;BLURSCALEX;LOWLUMSCAN;HILUMSCAN;BRIGHTBOOST;MASK_DARK;MASK_FADE"
shader0 = "D:\retroarch\shaders\shaders_glsl\retro\shaders\pixellate.glsl"
shader1 = "D:\retroarch\shaders\shaders_glsl\misc\image-adjustment.glsl"
shader2 = "D:\retroarch\shaders\shaders_glsl\crt\shaders\zfast_crt.glsl"
shaders = "3"
srgb_framebuffer0 = "false"
srgb_framebuffer1 = "false"
srgb_framebuffer2 = "false"
wrap_mode0 = "clamp_to_border"
wrap_mode1 = "clamp_to_border"
wrap_mode2 = "clamp_to_border"