CRT shader debate

mask fade 0%:

mask fade 70%

mask fade 100%

Any suggestions for a different name for mask_fade setting?

How do you feel about the mask_fade set 100% permanently-ish?

Hmm, not really. I’m not great at that sort of thing. I think “mask/scanline fade” is a pretty good description.

I think a setting of 100% is too high. Scanlines shouldn’t completely disappear over pure white. On a properly calibrated CRT, the scanlines (black lines) are clearly visible over white and become gradually thicker over darker colors. There is no single “correct” setting for this, but a setting of 100% is “wrong,” as is a setting of 0%.

I settled on a value of 70% for mask fade as anything higher than this starts to look obviously over-bloomed.

1 Like

Can you post the shader settings you used for this pic?

Or is that a real CRT? That looks like Lottes but the scanlines are more defined. It looks really good!

You’ll need to grab the combined zfast_crt+dotmask glsl shader and put it in the appropriate directory. You’ll also need to alter the shader file paths within the GLSLP file below to the correct file paths for your system.

Importantly, I’ve adjusted my display backlight to 100%. This allows me to increase the mask/scanlines strength quite a bit without compromising on brightness. Depending on how bright your display gets, you’ll probably need to make adjustments to “maskDark,” “maskLight,” “MASK_FADE,” and possibly need to also adjust “LOWLUMSCAN,” “HILUMSCAN,” “BRIGHTBOOST.” Be aware that altering some of these settings can affect black level and contrast, so you might want to use Fudoh’s 240p test suite to make adjustments.

Here’s the GLSLP file. This should go in Retroarch/shaders:

alias0 = ""
alias1 = ""
BLURSCALEX = "0.300000"
BRIGHTBOOST = "1.100000"
DOTMASK_STRENGTH = "0.300000"
feedback_pass = "0"
filter_linear0 = "false"
filter_linear1 = "true"
float_framebuffer0 = "false"
float_framebuffer1 = "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.000001"
ia_RMASK = "0.000000"
ia_saturation = "1.000000"
ia_SHARPEN = "0.000000"
ia_target_gamma = "2.400000"
ia_TOPMASK = "0.000000"
ia_XPOS = "0.000000"
ia_YPOS = "0.000000"
ia_ZOOM = "1.000000"
LOWLUMSCAN = "9.000000"
MASK_DARK = "0.000000"
MASK_FADE = "0.700000"
maskDark = "0.100000"
maskLight = "1.500000"
mipmap_input0 = "false"
mipmap_input1 = "false"
parameters = "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;shadowMask;DOTMASK_STRENGTH;maskDark;maskLight"
shader0 = "D:\retroarch\shaders\shaders_glsl\misc\image-adjustment.glsl"
shader1 = "D:\retroarch\shaders\shaders_glsl\crt\shaders\zfast_crt+dotmask.glsl"
shaders = "2"
shadowMask = "3.000000"
srgb_framebuffer0 = "false"
srgb_framebuffer1 = "false"
wrap_mode0 = "clamp_to_border"
wrap_mode1 = "clamp_to_border"

@Nesguy Would you be willing to test a shader I’ve been hacking together based off your settings?

sure, I can check it out.

Thanks alot, it’ll probably be around tomorrow night when I upload it (tweaking some things).

Can your system handle multipass bloom shaders like crtglow_gauss, crt-hyllian-glow, etc?

It’s a modified zfast-dotmask shader, with adjustable bloom multipass.

The emu box I’m using is pretty low-powered so that rules out complex multi pass shaders, but my work laptop might be able to handle it.

Bloom and multipass shaders hurt my head.

My modified zfast-dotmask is working pretty good though.

EDIT: Figured it out, I was just doing stupid things.

I’m going to default my modified zfast-dotmask to your settings for your testing because that’s the settings I’m testing anyway. It will also be running a modified bloom multipass. I wouldn’t suggest running image_adjustment with this shader. (This also may be brighter than your “ia & zfast” combo. I haven’t used that “ia & zfast” combo in a couple weeks so I kinda don’t remember what it looks like in brightness.)

Also where should I upload this for you to test?

If you still have those settings for @Nesguy shader at non-max brightness lying around I’d appreciate them.

I think Dropbox would work.

I’m just doing some last-minute tweaking, I’ll be uploading an alpha soon.

I would probably just leave mask dark at the default setting (0.50). If the image is still too dark you’ll have to reduce the scanline strength.

I was asking for those settings so I could figure out a not 100% screen brightness version of your settings. For people that would like that look but don’t want to fiddle with tv settings and shader settings.

Right, that’s what I was assuming you meant.

1 Like

@Nesguy

Here you go. It’s an alpha.

EDIT: I left the bloom stuff at default settings. The settings I’m using are Bloom: Bleed 3.5 higher less bleed for lower Bloom: Strength Numbers I’m using around Bloom: Strength 0.20 and I dropped Scanlines: Fade down to 0.65.

1 Like

My current settings:

After playing around with mask/backlight tricks for a while, I’ve concluded that non-HDR capable displays are incapable of maintaining sufficient peak brightness when both 1:1 scanlines and the RGB mask are applied, without adding a significant amount of bloom/fade to the scanlines. This is true even if the backlight is adjusted to 100%.

The problem is that when you add 1:1 scanlines and max out the mask strength, it’s something like a 70-80% reduction in brightness. So, you have to increase the backlight by 4x or 5x the normal level, and there isn’t enough spare brightness available to compensate on even the brightest LED-lit LCDs (that lack HDR).

To maintain adequate brightness, you have to either reduce the strength of the scanlines or the mask, or you have to add a lot of bloom/fade to the image, or you have to mess with the black level, contrast or color levels.

If the scanlines are much less below 1:1, if the image isn’t bright enough/too bright, if the image is too sharp, if the image is too blurry, if the scanlines are misaligned, if color/black level/contrast isn’t calibrated, if the image is too smooth (ie no mask)- then it isn’t optimal.

With the below settings, I’ve opted to lower the mask strength in order to have 1:1 scanlines. The mask strength can’t be increased further without either adding a lot of bloom or reducing the scanline strength in order to maintain brightness. I still have to adjust my backlight to 100% for these settings to look right.

alias0 = ""
alias1 = ""
alias2 = ""
BLURSCALEX = "0.300000"
BRIGHTBOOST = "1.000000"
DOTMASK_STRENGTH = "0.000000"
feedback_pass = "0"
filter_linear1 = "true"
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.400000"
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"
maskDark = "0.700000"
maskLight = "1.400000"
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;shadowMask;DOTMASK_STRENGTH;maskDark;maskLight"
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+dotmask.glsl"
shaders = "3"
shadowMask = "3.000000"
srgb_framebuffer0 = "false"
srgb_framebuffer1 = "false"
srgb_framebuffer2 = "false"
wrap_mode0 = "clamp_to_border"
wrap_mode1 = "clamp_to_border"
wrap_mode2 = "clamp_to_border"

In the next example I’ve left the mask strength at the defaults, which makes the mask a bit stronger than in the above example. I had to then increase mask/scanline fade to 0.45 to compensate for the lost brightness. Both of these images are equally bright. I think I prefer the above image, with no bloom, but both are acceptable IMO.

EDIT: fixed screenshots.

4 Likes

I think those are the same image