Please show off what crt shaders can do!

Oh and I also suspect that a lot (if not most) of crt tvs are actually wider than 4:3. The screenshots above are 1.38, and that matches the Trinitron’s a.r. 1.33 (4:3) is noticeably skinnier.

@Squalo Are you using color-mangler for those screenshots?

If so, mind sharing your settings?

Is it possible to have a slang version of the Zfast_crt+dotmask shader, please ?

@Syh sure of course. I didn’t save that particular one, did it on the fly, but this should yield very similar results.

gamma_boost_r = "0.200000"
gamma_boost_g = "0.200000"
gamma_boost_b = "0.200000"
sat_r = "1.200000"
sat_g = "1.000000"
sat_b = "1.100000"
lum = "1.000000"
cntrst = "1.000000"
r = "1.000000"
g = "1.000000"
b = "1.050000"
rg = "0.050000"
rb = "0.050000"
gr = "0.000000"
gb = "0.180000"
br = "0.000000"
bg = "0.080000"
blr = "0.000000"
blg = "0.000000"
blb = "0.000000"

Also, Saturn :heart:

3 Likes

For those that don’t know, a while back I made the “crt-potato” shader that was intended to be similar/inbetween to crt-royale-kurozumi and PVM RGB… except very fast. I didn’t like the way those other shaders had so many effects stacked on top of each other, creating a very large performance penalty, when I never messed with the settings and just used the defaults.

crt-potato has no settings, and it was designed to run on, well, potatoes, so just about anything, including rpi’s. Here is a comparison:

It’s current available in the “crt” folder of the default RetroArch shaders if anyone has a use for it.

8 Likes

This is definitely more my style; I like to keep it simple with shaders. Actually, I recently started playing around with overlays again, and I’ve been pleasantly surprised by the results one can achieve with just a simple scanline overlay and some light blur.

I think CRT-potato could stack nicely with TVout-tweaks for some adjustable sharpness/blur, but I haven’t tried it yet. I’ve found that a slight amount of blur can improve the image, and is more like what an actual CRT looks like. No CRT was as sharp as an LCD with nearest neighbor; a CRT at the same resolution will always be less sharp than an LCD. Consequently, pixel art suffers on an LCD when upscaled with nearest neighbor because it’s much sharper than what the artist could have possibly intended.

I was thinking that the scanline overlays+blur concept could be turned into a good lightweight shader. You’d have the following options:

Scanline overlay resolution: choose 896, 960, or 1120

Scanline overlay beam dynamics: for 896 or 960, choose 1-4. For 1120, choose 1-9. This would essentially switch between different overlays for the selected resolution (see below).

Scanline opacity: 0-100

add TVout-tweaks

add dotmask

Scanline overlay patterns (numbers represent % black, 100 is full black)

896/960 resolution:

100
0
0
100

50
0
50
100

55
0
55
90

60
0
60
80

1120 resolution:

100
0
0
0
100

100
0
0
100
100

100
25
0
25
100

95
30
0
30
95

90
35
0
35
90

85
40
0
40
85

80
45
0
45
80

75
50
0
50
75

70
55
0
55
70

Here’s an example using one of the 1920x1120 overlays and TVout-tweaks-multipass:

I should have added that I always crank up my display’s backlight when attempting any kind of CRT emulation, to compensate for the lost brightness from scanlines without altering the original color values. I don’t care for the overbloomed, poorly-maintained CRT look.

Some people prefer the way a 15kHz consumer-grade CRT looks compared to a high quality PVM, BVM, or 31kHz CRT. It’s a very different look. You can certainly achieve results like that with a scanline overlay, dotmask shader and some slight blur.

This is with version 1 of the 1920x1120 overlay I made, at 50% opacity, with some blur added by TVout-tweaks and the dotmask shader applied.

2 Likes

Hello ! I don’t speak very well english. Here’s a better link with no quality loss https://ibb.co/yWgc0dk ,click on the picture for full quality size,i will try to explain my preset used in retroarch. I deleted my last post cause had loss in quality. Edit: It must be opened with paint on windows for real colors and aspect ratio, do not use windows photo viewer cause it changes colors and brightness ! 2nd Edit : i have a 4k screen and i didn’t activated subpixels offset runtime for fan noise even if it’s better look with subpixels offset .

2 Likes

Looks good. What shader/settings are you using?

2 Likes

I just understood that you have to download the image to have the true quality without deformation by the link that I posted,i’m using crt-royale and i changed a lot of values from user-settings.h like levels_autodim_temp to 1.0 beam_num_scanlines to 3.0 beam_antialias_level to 2.0 diabling lanczos sinc who add ringing and other things i have to see on that file i don’t remember and lowered srgb 100% to 99 important ,gamma 2.60 etc here’s my preset

shaders = "12"
shader0 = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\src\crt-royale-first-pass-linearize-crt-gamma-bob-fields.slang"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = "ORIG_LINEARIZED"
float_framebuffer0 = "false"
srgb_framebuffer0 = "true"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\src\crt-royale-scanlines-vertical-interlacing.slang"
filter_linear1 = "true"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = "VERTICAL_SCANLINES"
float_framebuffer1 = "false"
srgb_framebuffer1 = "true"
scale_type_x1 = "source"
scale_x1 = "1.000000"
scale_type_y1 = "viewport"
scale_y1 = "1.000000"
shader2 = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\src\crt-royale-bloom-approx.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = "BLOOM_APPROX"
float_framebuffer2 = "false"
srgb_framebuffer2 = "true"
scale_type_x2 = "source"
scale_x2 = "1.000000"
scale_type_y2 = "source"
scale_y2 = "1.000000"
shader3 = "D:\RetroArch\shaders\shaders_slang\blurs\blur9fast-vertical.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = ""
float_framebuffer3 = "false"
srgb_framebuffer3 = "true"
scale_type_x3 = "source"
scale_x3 = "1.000000"
scale_type_y3 = "source"
scale_y3 = "1.000000"
shader4 = "D:\RetroArch\shaders\shaders_slang\blurs\blur9fast-horizontal.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "HALATION_BLUR"
float_framebuffer4 = "false"
srgb_framebuffer4 = "true"
scale_type_x4 = "source"
scale_x4 = "1.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\src\crt-royale-mask-resize-vertical.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = ""
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "absolute"
scale_x5 = "64"
scale_type_y5 = "viewport"
scale_y5 = "0.062500"
shader6 = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\src\crt-royale-mask-resize-horizontal.slang"
filter_linear6 = "false"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = "MASK_RESIZE"
float_framebuffer6 = "false"
srgb_framebuffer6 = "false"
scale_type_x6 = "viewport"
scale_x6 = "0.062500"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\src\crt-royale-scanlines-horizontal-apply-mask.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "MASKED_SCANLINES"
float_framebuffer7 = "false"
srgb_framebuffer7 = "true"
scale_type_x7 = "viewport"
scale_x7 = "1.000000"
scale_type_y7 = "viewport"
scale_y7 = "1.000000"
shader8 = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\src\crt-royale-brightpass.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = "BRIGHTPASS"
float_framebuffer8 = "false"
srgb_framebuffer8 = "true"
scale_type_x8 = "viewport"
scale_x8 = "1.000000"
scale_type_y8 = "viewport"
scale_y8 = "1.000000"
shader9 = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\src\crt-royale-bloom-vertical.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = ""
float_framebuffer9 = "false"
srgb_framebuffer9 = "true"
scale_type_x9 = "source"
scale_x9 = "1.000000"
scale_type_y9 = "source"
scale_y9 = "1.000000"
shader10 = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\src\crt-royale-bloom-horizontal-reconstitute.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = ""
float_framebuffer10 = "false"
srgb_framebuffer10 = "true"
scale_type_x10 = "source"
scale_x10 = "1.000000"
scale_type_y10 = "source"
scale_y10 = "1.000000"
shader11 = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\src\crt-royale-geometry-aa-last-pass.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "true"
alias11 = ""
float_framebuffer11 = "false"
srgb_framebuffer11 = "false"
scale_type_x11 = "viewport"
scale_x11 = "1.000000"
scale_type_y11 = "viewport"
scale_y11 = "1.000000"
parameters = "crt_gamma;lcd_gamma;levels_contrast;halation_weight;diffusion_weight;bloom_underestimate_levels;bloom_excess;beam_min_sigma;beam_max_sigma;beam_spot_power;beam_min_shape;beam_max_shape;beam_shape_power;beam_horiz_filter;beam_horiz_sigma;beam_horiz_linear_rgb_weight;convergence_offset_x_r;convergence_offset_x_g;convergence_offset_x_b;convergence_offset_y_r;convergence_offset_y_g;convergence_offset_y_b;mask_type;mask_sample_mode_desired;mask_specify_num_triads;mask_triad_size_desired;mask_num_triads_desired;aa_subpixel_r_offset_x_runtime;aa_subpixel_r_offset_y_runtime;aa_cubic_c;aa_gauss_sigma;geom_mode_runtime;geom_radius;geom_view_dist;geom_tilt_angle_x;geom_tilt_angle_y;geom_aspect_ratio_x;geom_aspect_ratio_y;geom_overscan_x;geom_overscan_y;border_size;border_darkness;border_compress;interlace_bff;interlace_1080i"
crt_gamma = "2.600001"
lcd_gamma = "2.200000"
levels_contrast = "1.000000"
halation_weight = "0.000000"
diffusion_weight = "0.000000"
bloom_underestimate_levels = "0.800000"
bloom_excess = "0.195000"
beam_min_sigma = "0.255000"
beam_max_sigma = "0.005000"
beam_spot_power = "0.010000"
beam_min_shape = "2.000000"
beam_max_shape = "2.000000"
beam_shape_power = "0.010000"
beam_horiz_filter = "1.000000"
beam_horiz_sigma = "0.350000"
beam_horiz_linear_rgb_weight = "0.990000"
convergence_offset_x_r = "0.000000"
convergence_offset_x_g = "0.000000"
convergence_offset_x_b = "0.000000"
convergence_offset_y_r = "0.000000"
convergence_offset_y_g = "0.000000"
convergence_offset_y_b = "0.000000"
mask_type = "0.000000"
mask_sample_mode_desired = "0.000000"
mask_specify_num_triads = "0.000000"
mask_triad_size_desired = "3.000000"
mask_num_triads_desired = "480.000000"
aa_subpixel_r_offset_x_runtime = "0.000000"
aa_subpixel_r_offset_y_runtime = "0.000000"
aa_cubic_c = "0.500000"
aa_gauss_sigma = "0.500000"
geom_mode_runtime = "0.000000"
geom_radius = "2.000000"
geom_view_dist = "2.000000"
geom_tilt_angle_x = "0.000000"
geom_tilt_angle_y = "0.000000"
geom_aspect_ratio_x = "432.000000"
geom_aspect_ratio_y = "329.000000"
geom_overscan_x = "1.000000"
geom_overscan_y = "1.000000"
border_size = "0.000000"
border_darkness = "0.000000"
border_compress = "1.000000"
interlace_bff = "0.000000"
interlace_1080i = "0.000000"
textures = "mask_grille_texture_small;mask_grille_texture_large;mask_slot_texture_small;mask_slot_texture_large;mask_shadow_texture_small;mask_shadow_texture_large"
mask_grille_texture_small = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\TileableLinearApertureGrille15Wide8And5d5SpacingResizeTo64.png"
mask_grille_texture_small_linear = "true"
mask_grille_texture_small_wrap_mode = "repeat"
mask_grille_texture_small_mipmap = "false"
mask_grille_texture_large = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\TileableLinearApertureGrille15Wide8And5d5Spacing.png"
mask_grille_texture_large_linear = "true"
mask_grille_texture_large_wrap_mode = "repeat"
mask_grille_texture_large_mipmap = "true"
mask_slot_texture_small = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacingResizeTo64.png"
mask_slot_texture_small_linear = "true"
mask_slot_texture_small_wrap_mode = "repeat"
mask_slot_texture_small_mipmap = "false"
mask_slot_texture_large = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacing.png"
mask_slot_texture_large_linear = "true"
mask_slot_texture_large_wrap_mode = "repeat"
mask_slot_texture_large_mipmap = "true"
mask_shadow_texture_small = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\TileableLinearShadowMaskEDPResizeTo64.png"
mask_shadow_texture_small_linear = "true"
mask_shadow_texture_small_wrap_mode = "repeat"
mask_shadow_texture_small_mipmap = "false"
mask_shadow_texture_large = "D:\RetroArch\shaders\shaders_slang\crt\shaders\crt-royale\TileableLinearShadowMaskEDP.png"
mask_shadow_texture_large_linear = "true"
mask_shadow_texture_large_wrap_mode = "repeat"
mask_shadow_texture_large_mipmap = "true"
2 Likes

It’s current available in the “crt” folder of the default RetroArch shaders if anyone has a use for it

Would you mind clarifying what you mean by this? I can’t seem to find crt-potato file anywhere in RetroArch’s shader folders.

It’s in GLSL and slang formats:

1 Like

Hey :slight_smile: 2 more presets this time using crt guest shader on my 4k monitor,1st one with convergence offset and 2nd with slotmask strength pushed to max. Remember to download image and using paint if you are windows users,scaling on browsers is not good( i tried with firefox everything is wrong the picture ) 1 https://ibb.co/qdNQK54 2 https://ibb.co/T24LGgy

1 Like

Pro CRTs with 900/1000 TV lines would like to have a word with you =p

The end result here kinda looks like a ~600 TVL monitor that is aging and has thus become a bit blurry. Still looks nice.

1 Like

I have a 31 kHz PC monitor which is even sharper than the xVMs, and I agree that 240p content on such a display without any shaders is basically indistinguishable from an LCD using nearest neighbor scaling. However, there’s still a slight amount of “softness” compared to the LCD that’s hard to pinpoint/explain. Even though it’s just as sharp in terms of the detail it shows, the way the CRT emits light directly from the phosphors somehow makes it softer than the LCD even when both are displaying the same resolution, if that makes any sense. It’s similar to why plasmas look softer (and better, IMO) compared to LCDs, even though both are 1080p.

Thanks! That’s pretty much exactly what I was going for; the bloom/blur is slightly exaggerated in the example to make the scanlines a bit more dynamic. That’s just TVout-tweaks-multipass combined with a custom scanlines overlay. I don’t like how a lot of shaders at their default settings result in clipping and/or alter the color levels as a way to make up for lost brightness, and I don’t like having a lot of effects stacked on top of each other. Instead, I just adjust my backlight to 100% and the only effects I use are scanlines, some light blur, and maybe the mask. If your screen has the brightness for it, this method can produce some pretty nice results, IMO.

The following is my approximation of a consumer-grade 15 kHz CRT that’s been modded for RGB output. At 1080p, the mask is 360 TVL (1080 pixels / 3 pixels per phosphor “triad” = 360 distinct lines). Since TVs in the late 80s early 90s were typically 300-400 TVL, the mask effect at 1080p is perfect for emulating a TV from this era.

Using the dotmask shader, I’ve lowered mask_dark to 0.10, and lowered mask_light to 1.00. The default setting of 1.50 for mask_light results in clipping; in fact, any setting above 1.00 for mask_light seems to result in clipping if your display is already calibrated for maximum contrast ratio. At 0.10, mask_dark is as low as it can get without completely wrecking the contrast ratio and saturation. I’ve also set gamma to 2.4 and signal resolution to 480, using TVout-tweaks-multipass. The scanlines are from a custom overlay.

The following shots are probably absurdly dark at normal display settings, but look properly bright on my display if I adjust the backlight to 100%. Most LED-lit LCDs should be capable of sufficient brightness with these settings. I think an OLED display with these settings would probably look really good.

4 Likes

With proper brightness I can imagine that looking pretty close to a consumer CRT, at least when there’s not too much motion going on. Current OLEDs cannot get as bright as LCDs, unfortunately. Even if they can, their automatic brightness limiters (to protect against overheating) are likely to kick in at those levels anyway.

1 Like

Huh, I didn’t know that. I was under the impression that the brightness of OLEDs was only slightly less than LCDs, but yeah, the overheating/brightness limiter thing is something I didn’t even think about. I was thinking that the superior blacks and contrast ratio of OLEDs coupled with the emissive nature of the display would look closer to how a CRT actually works, but the brightness limiter might be a deal breaker as far as CRT emulation is concerned (at least the way I’m doing it). An HDR-capable LCD is probably the way to go, instead.

@ProfessorBraun and @Nesguy: different approaches, both really nice I must say!

2 Likes

@Squalo You’re my new best friend, after setting up your color mangler settings manually, I was finally able to really focus in on the changes. Now I’ve been able to get my only color profile going.

gamma_boost_r = "0.200000"
gamma_boost_g = "0.200000"
gamma_boost_b = "0.200000"
sat_r = "1.200000"
sat_g = "1.050000"
sat_b = "1.100000"
lum = "1.000000"
cntrst = "1.000000"
r = "1.000000"
g = "1.000000"
b = "1.050000"
rg = "0.000000"
rb = "0.000000"
gr = "0.000000"
gb = "0.100000"
br = "0.050000"
bg = "0.150000"
blr = "0.000000"
blg = "0.000000"
blb = "0.000000"

Sorry if it looks odd, it was done by eye, on a TV that was calibrated by eye, while I was running crt-apeture on top of it.

How is everyone getting their screenshots, are you guys just using the one built into retroarch?

EDIT: Changed my settings.

1 Like

Which shaders are you combining for the effects?