Please show off what crt shaders can do!

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.

5 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?

yes you need to enable gpu screenshots ( Screenshots output of GPU shaded material if available ) in video tab and bind to your keyboard if you want

I’m glad you find them useful. Color mangler is here to stay indeed! I screen-capture with reshade by the way.

2 Likes

@Diego I’m using color mangler.glsl with a modified version of crt-apeture running on top of it.

@ProfessorBraun Thanks, that’s what I thought. I was just wanting to clarify.

@Squalo Yeah, I’m really prefering color mangler to using LUTs.

1 Like

How would you actually utilize the HDR levels of brightness? I don’t think RetroArch has HDR support, does it?

Could you share the code?

1 Like

I’m planning on it, I’m still currently working on this shader.

1 Like

Windows 10 now has its own HDR brightness control, so you can manually adjust it within Windows. I haven’t personally tried this yet, so I can’t say for sure if this works with RA.

Here are some examples using the same approach in my previous post, but with some slightly less extreme mask settings. After taking some rather crude measurements and doing some rough calculations that I’m sure aren’t completely accurate, I’ve settled on the following:

mask_dark: 0.30

mask_light: 1.00

On my display, which has a max of around 350 cd/m2, this should result in a peak brightness of at least 100 cd/m2 with my backlight adjusted to 100% and with scanlines applied, right around what most CRTs were capable of. My previous setting of 0.10 for mask_dark was really too dark even in a dim room with my backlight adjusted to 100%.

For mask_light, any settings above 1.00 seems to result in clipping if the display is already calibrated for maximum contrast ratio.

I’ve set TVout-tweaks signal resolution to 480, and the scanlines are from an overlay.

3 Likes

Hi! Can you try this 2 presets on your 1080p screen and tell me how does it looks on it ? View pictures with paint for real mask scaling or just try the presets :man_technologist: 1 https://ibb.co/3fxgpGh 2 https://ibb.co/SPXwp8N
Preset 1

shaders = "1"
shader0 = "D:\RetroArch\shaders\shaders_glsl\crt\shaders\crt-aperture.glsl"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
parameters = "SHARPNESS_IMAGE;SHARPNESS_EDGES;GLOW_WIDTH;GLOW_HEIGHT;GLOW_HALATION;GLOW_DIFFUSION;MASK_COLORS;MASK_STRENGTH;MASK_SIZE;SCANLINE_SIZE_MIN;SCANLINE_SIZE_MAX;GAMMA_INPUT;GAMMA_OUTPUT;BRIGHTNESS"
SHARPNESS_IMAGE = "1.000000"
SHARPNESS_EDGES = "1.000000"
GLOW_WIDTH = "0.050000"
GLOW_HEIGHT = "0.050000"
GLOW_HALATION = "0.000000"
GLOW_DIFFUSION = "0.000000"
MASK_COLORS = "3.000000"
MASK_STRENGTH = "0.300000"
MASK_SIZE = "2.000000"
SCANLINE_SIZE_MIN = "1.150000"
SCANLINE_SIZE_MAX = "1.300000"
GAMMA_INPUT = "2.500000"
GAMMA_OUTPUT = "2.200000"
BRIGHTNESS = "1.000000"
1 Like