New CRT shader from Guest + CRT Guest Advanced updates

I could not reproduce the miss-effect on my test pattern using the exact preset:

Could you try running the same pattern?

If you get artifacting with the latest version, you can try enable float framebuffer on the main pass.

3 Likes

This is a cool test image, could you share the source image?

2 Likes

Seems like the issue is on my end. No artifacts in your image. They are faint but you can see them in my screenshot (check the green bars on the side) :

Made a pure white 800x600 image to test. Same issue :

I’ll test again with a clean install of RA!

2 Likes

There are many variations on it, but here’s one: https://www.freepik.com/premium-vector/no-tv-signal-chanel-program-background-template_2695244.htm

another good one: https://freesvg.org/tv-test-screen-vector-illustration

3 Likes

You can also try to increase the coordinate multiplier with various passes.

An example:

vTexCoord = TexCoord * 1.000001

I’m pretty sure it’s a driver discrepancy and it would be very nice the issue would be resolved.

You can still try to use float framebuffer with the main pass as the corner value gets passed to the last pass.

3 Likes

Yeah, clean install didn’t work. Will try this. Do I replace this in every pass or just the main GDV-Advanced slang?

EDIT - Nevermind. Just saw you said various passes already, lol!

2 Likes

New Release Version (04.03.2021-r1):

Notable changes:

  • Changed few lines of code which might caused artifacting with some adapters and settings.
  • Downsampling is a notch better quality now.

Download link:

https://mega.nz/file/144FyAoZ#J322nF3AmpkPihBP6G0YhdSTXwYhYvuJkW3199DGQT4

9 Likes

I enjoy CRT Mask 6. I like it because I can get a very “dotty” style of mask similar to crt_royale. The only problem is the color get very dark and blue in high res content. (First shot with no shader, second with base venom_advanced crt mask 6.)

6 Likes

Checked the new update. The artifacts are not as obvious as before, but still there (also noticed the Colors and Bloom aren’t as washed out as before with Interlace Interpolation) :

Setting the main pass float_framebuffer9 = "true" didn’t help, neither did changing the vTexCoord = TexCoord * 1.000001 values (larger values just scaled the viewport). I also replaced every pass other than the main pass with a stock pass and the issue is still there.

I don’t mind it as much now though. I will just wait and get a new GPU (if they are in stock, lol), I’m currently stuck using the Intel iGPU. Are you using NVIDIA or AMD?

2 Likes

Wow… nice screenshots! Games look amazing, how you did that? I can’t find the shader that mixes crt + xbr.

3 Likes

I’m using AMD, which tends to have some tolerant handling of some situations. I think nVidia users should run the shaders well after some adaptations. With intel igpu’s i guess the fast version should be used, hope it runs a bit better in this case.

2 Likes

Hey @guest.r i really like your shader! Thanks for doing this! Love it on my 1080p screen! But want to see how it looks on 4k TV OLED, is there any setting in the shader parameters i should change since it’s a different resolution?

1 Like

Indeed. The most attention could require mask settings. With narrow masks (0, 5, 7) and slotmask you might want to increase the Mask size parameter(s) to 2.0. Otherwise other aspects are interpolated, which also means you can get better overall look with 4k, more even scanlines etc.

1 Like

I see thanks! In terms of aspect ratio should i just leave it to core provided / 4:3?

2 Likes

I think if not using specific bezels and you use a large display then you can use core-provided with good results. Personally i think some vertical games might not get enough width on smaller displays, but you should be fine with the large OLED.

2 Likes

I’d like to apologize for sitting on top of this Grade/Advanced/Coarse/Glass preset for a while now; I’ve had and have plenty of life to deal with lately. The beam profile has been reconfigured on top of being my brightest and most lossless preset yet.

@BendBombBoom, I use mask 6 myself; try reducing “Mask 5-7 Low Strength”.

Normal Version: coarse.slang required

shaders = "13"
shader0 = "shaders_slang/misc/grade.slang"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = "StockPass"
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "shaders_slang/crt/shaders/guest/advanced/afterglow0.slang"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = "AfterglowPass"
float_framebuffer1 = "false"
srgb_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "1.000000"
scale_type_y1 = "source"
scale_y1 = "1.000000"
shader2 = "shaders_slang/crt/shaders/guest/advanced/pre-shaders-afterglow.slang"
filter_linear2 = "false"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = "PrePass"
float_framebuffer2 = "false"
srgb_framebuffer2 = "false"
scale_type_x2 = "source"
scale_x2 = "1.000000"
scale_type_y2 = "source"
scale_y2 = "1.000000"
shader3 = "shaders_slang/crt/shaders/guest/advanced/avg-lum.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "true"
alias3 = "AvgLumPass"
float_framebuffer3 = "false"
srgb_framebuffer3 = "false"
scale_type_x3 = "source"
scale_x3 = "1.000000"
scale_type_y3 = "source"
scale_y3 = "1.000000"
shader4 = "shaders_slang/crt/shaders/guest/advanced/linearize.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "LinearizePass"
float_framebuffer4 = "true"
srgb_framebuffer4 = "false"
scale_type_x4 = "source"
scale_x4 = "1.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/crt/shaders/guest/advanced/gaussian_horizontal.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = ""
float_framebuffer5 = "true"
srgb_framebuffer5 = "false"
scale_type_x5 = "absolute"
scale_x5 = "800"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt/shaders/guest/advanced/gaussian_vertical.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = "GlowPass"
float_framebuffer6 = "true"
srgb_framebuffer6 = "false"
scale_type_x6 = "absolute"
scale_x6 = "800"
scale_type_y6 = "absolute"
scale_y6 = "600"
shader7 = "shaders_slang/crt/shaders/guest/advanced/bloom_horizontal.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = ""
float_framebuffer7 = "true"
srgb_framebuffer7 = "false"
scale_type_x7 = "absolute"
scale_x7 = "800"
scale_type_y7 = "absolute"
scale_y7 = "600"
shader8 = "shaders_slang/crt/shaders/guest/advanced/bloom_vertical.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = "BloomPass"
float_framebuffer8 = "true"
srgb_framebuffer8 = "false"
scale_type_x8 = "source"
scale_x8 = "1.000000"
scale_type_y8 = "source"
scale_y8 = "1.000000"
shader9 = "shaders_slang/crt/shaders/guest/advanced/crt-guest-advanced.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = ""
float_framebuffer9 = "false"
srgb_framebuffer9 = "false"
scale_type_x9 = "viewport"
scale_x9 = "1.000000"
scale_type_y9 = "viewport"
scale_y9 = "1.000000"
shader10 = "shaders_slang/crt/shaders/guest/advanced/deconvergence.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = ""
float_framebuffer10 = "false"
srgb_framebuffer10 = "false"
scale_type_x10 = "viewport"
scale_x10 = "1.000000"
scale_type_y10 = "viewport"
scale_y10 = "1.000000"
shader11 = "shaders_slang/crt/shaders/guest/coarse.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "false"
alias11 = ""
float_framebuffer11 = "false"
srgb_framebuffer11 = "false"
scale_type_x11 = "source"
scale_x11 = "1.000000"
scale_type_y11 = "source"
scale_y11 = "1.000000"
shader12 = "shaders_slang/misc/Glass.slang"
filter_linear12 = "true"
wrap_mode12 = "clamp_to_border"
mipmap_input12 = "false"
alias12 = ""
float_framebuffer12 = "false"
srgb_framebuffer12 = "false"
scale_type_x12 = "source"
scale_x12 = "1.000000"
scale_type_y12 = "source"
scale_y12 = "1.000000"
g_gamma_in = "2.499999"
g_signal_type = "0.000000"
g_crtgamut = "0.000000"
g_vstr = "50.000000"
g_vpower = "0.100000"
PR = "0.120000"
PG = "0.120000"
PB = "0.120000"
AS = "0.020000"
sat = "1.000000"
vigstr = "0.200000"
vigdef = "4.999999"
viground = "16.000000"
lsmooth = "0.970000"
GAMMA_INPUT = "2.500000"
interm = "4.000000"
SIZEH = "50.000000"
SIGMA_H = "1.000000"
SIZEV = "50.000000"
SIGMA_V = "1.000000"
SIZEHB = "50.000000"
SIGMA_HB = "0.500000"
SIZEVB = "50.000000"
SIGMA_VB = "0.500000"
glow = "0.030000"
halation = "0.200000"
gamma_c = "0.900000"
brightboost = "2.000000"
brightboost1 = "0.800000"
scanline1 = "0.000000"
scanline2 = "15.000000"
beam_min = "1.999999"
beam_max = "0.850000"
beam_size = "0.300000"
scans = "0.000000"
spike = "0.700000"
h_sharp = "5.000000"
s_sharp = "0.000000"
OS = "0.000000"
BLOOM = "1.000000"
csize = "0.020000"
warpX = "0.030000"
warpY = "0.040000"
shadowMask = "6.000000"
maskstr = "0.500000"
mcut = "0.500000"
mask_gamma = "5.000000"
slotmask = "0.500000"
slotwidth = "3.000000"
double_slot = "2.000000"
gamma_out = "2.500000"
g_flicker = "0.150000"
g_reflgrain = "0.200000"
g_reflstr = "0.100000"
g_fresnel = "0.500000"
gz = "1.050000"
gy = "0.000000"
goyr = "0.030000"
goxg = "-0.030001"
goyg = "0.000000"
goyb = "-0.030000"
TO = "0.000000"
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4"
SamplerLUT1 = "shaders_slang/crt/shaders/guest/lut/sony_trinitron1.png"
SamplerLUT1_linear = "true"
SamplerLUT1_wrap_mode = "clamp_to_border"
SamplerLUT1_mipmap = "false"
SamplerLUT2 = "shaders_slang/crt/shaders/guest/lut/sony_trinitron2.png"
SamplerLUT2_linear = "true"
SamplerLUT2_wrap_mode = "clamp_to_border"
SamplerLUT2_mipmap = "false"
SamplerLUT3 = "shaders_slang/crt/shaders/guest/lut/other1.png"
SamplerLUT3_linear = "true"
SamplerLUT3_wrap_mode = "clamp_to_border"
SamplerLUT3_mipmap = "false"
SamplerLUT4 = "shaders_slang/crt/shaders/guest/lut/custom_lut.png"
SamplerLUT4_linear = "true"
SamplerLUT4_wrap_mode = "clamp_to_border"
SamplerLUT4_mipmap = "false"

NTSC Version: coarse.slang required

shaders = "14"
shader0 = "shaders_slang/misc/grade.slang"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = "StockPass"
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "shaders_slang/crt/shaders/guest/advanced/afterglow0.slang"
filter_linear1 = "true"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = "AfterglowPass"
float_framebuffer1 = "false"
srgb_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "1.000000"
scale_type_y1 = "source"
scale_y1 = "1.000000"
shader2 = "shaders_slang/crt/shaders/guest/advanced/pre-shaders-afterglow.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = "PrePass0"
float_framebuffer2 = "false"
srgb_framebuffer2 = "false"
scale_type_x2 = "source"
scale_x2 = "1.000000"
scale_type_y2 = "source"
scale_y2 = "1.000000"
shader3 = "shaders_slang/crt/shaders/guest/advanced/ntsc/ntsc-pass1.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
frame_count_mod3 = "2"
mipmap_input3 = "false"
alias3 = ""
float_framebuffer3 = "true"
srgb_framebuffer3 = "false"
scale_type_x3 = "source"
scale_x3 = "4.000000"
scale_type_y3 = "source"
scale_y3 = "1.000000"
shader4 = "shaders_slang/crt/shaders/guest/advanced/ntsc/ntsc-pass2.slang"
filter_linear4 = "false"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "PrePass"
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
scale_type_x4 = "source"
scale_x4 = "0.500000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/crt/shaders/guest/advanced/avg-lum-ntsc.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "true"
alias5 = "AvgLumPass"
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "source"
scale_x5 = "1.000000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt/shaders/guest/advanced/linearize-ntsc.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = "LinearizePass"
float_framebuffer6 = "true"
srgb_framebuffer6 = "false"
scale_type_x6 = "source"
scale_x6 = "1.000000"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "shaders_slang/crt/shaders/guest/advanced/gaussian_horizontal.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = ""
float_framebuffer7 = "true"
srgb_framebuffer7 = "false"
scale_type_x7 = "absolute"
scale_x7 = "640"
scale_type_y7 = "source"
scale_y7 = "1.000000"
shader8 = "shaders_slang/crt/shaders/guest/advanced/gaussian_vertical.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = "GlowPass"
float_framebuffer8 = "true"
srgb_framebuffer8 = "false"
scale_type_x8 = "absolute"
scale_x8 = "640"
scale_type_y8 = "absolute"
scale_y8 = "480"
shader9 = "shaders_slang/crt/shaders/guest/advanced/bloom_horizontal.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = ""
float_framebuffer9 = "true"
srgb_framebuffer9 = "false"
scale_type_x9 = "absolute"
scale_x9 = "640"
scale_type_y9 = "absolute"
scale_y9 = "480"
shader10 = "shaders_slang/crt/shaders/guest/advanced/bloom_vertical.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = "BloomPass"
float_framebuffer10 = "true"
srgb_framebuffer10 = "false"
scale_type_x10 = "absolute"
scale_x10 = "640"
scale_type_y10 = "absolute"
scale_y10 = "480"
shader11 = "shaders_slang/crt/shaders/guest/advanced/crt-guest-advanced-ntsc.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "false"
alias11 = ""
float_framebuffer11 = "false"
srgb_framebuffer11 = "false"
scale_type_x11 = "viewport"
scale_x11 = "1.000000"
scale_type_y11 = "viewport"
scale_y11 = "1.000000"
shader12 = "shaders_slang/crt/shaders/guest/coarse.slang"
filter_linear12 = "true"
wrap_mode12 = "clamp_to_border"
mipmap_input12 = "false"
alias12 = ""
float_framebuffer12 = "false"
srgb_framebuffer12 = "false"
scale_type_x12 = "source"
scale_x12 = "1.000000"
scale_type_y12 = "source"
scale_y12 = "1.000000"
shader13 = "shaders_slang/misc/Glass.slang"
filter_linear13 = "true"
wrap_mode13 = "clamp_to_border"
mipmap_input13 = "false"
alias13 = ""
float_framebuffer13 = "false"
srgb_framebuffer13 = "false"
scale_type_x13 = "source"
scale_x13 = "1.000000"
scale_type_y13 = "source"
scale_y13 = "1.000000"
g_gamma_in = "2.500000"
g_crtgamut = "0.000000"
g_vstr = "50.000000"
g_vpower = "0.100000"
PR = "0.170000"
PG = "0.170000"
PB = "0.170000"
AS = "0.020000"
sat = "1.000000"
vigstr = "0.200000"
vigdef = "4.999999"
viground = "16.000000"
quality = "1.000000"
lsmooth = "0.970000"
GAMMA_INPUT = "2.500000"
interm = "4.000000"
SIZEH = "50.000000"
SIGMA_H = "1.000000"
SIZEV = "50.000000"
SIGMA_V = "1.000000"
SIZEHB = "50.000000"
SIGMA_HB = "0.500000"
SIZEVB = "50.000000"
SIGMA_VB = "0.500000"
glow = "0.030000"
halation = "0.250000"
gamma_c = "0.900000"
brightboost = "2.099999"
scanline1 = "0.000000"
scanline2 = "15.000000"
beam_min = "1.999999"
beam_max = "0.850000"
beam_size = "0.300000"
scans = "0.000000"
h_sharp = "5.999999"
s_sharp = "0.000000"
OS = "0.000000"
BLOOM = "1.000000"
csize = "0.020000"
warpX = "0.030000"
warpY = "0.040000"
shadowMask = "6.000000"
maskstr = "0.500000"
mcut = "0.500000"
mask_gamma = "5.000000"
slotmask = "0.500000"
slotwidth = "3.000000"
double_slot = "2.000000"
gamma_out = "2.500000"
g_flicker = "0.150000"
g_reflgrain = "0.200002"
g_reflstr = "0.100000"
g_fresnel = "0.500000"
gz = "1.050000"
gy = "0.000000"
goyr = "0.030000"
goxg = "-0.030000"
goyg = "0.000000"
goyb = "-0.030000"
TO = "0.000000"
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4"
SamplerLUT1 = "shaders_slang/crt/shaders/guest/lut/sony_trinitron1.png"
SamplerLUT1_linear = "true"
SamplerLUT1_wrap_mode = "clamp_to_border"
SamplerLUT1_mipmap = "false"
SamplerLUT2 = "shaders_slang/crt/shaders/guest/lut/sony_trinitron2.png"
SamplerLUT2_linear = "true"
SamplerLUT2_wrap_mode = "clamp_to_border"
SamplerLUT2_mipmap = "false"
SamplerLUT3 = "shaders_slang/crt/shaders/guest/lut/other1.png"
SamplerLUT3_linear = "true"
SamplerLUT3_wrap_mode = "clamp_to_border"
SamplerLUT3_mipmap = "false"
SamplerLUT4 = "shaders_slang/crt/shaders/guest/lut/custom_lut.png"
SamplerLUT4_linear = "true"
SamplerLUT4_wrap_mode = "clamp_to_border"
SamplerLUT4_mipmap = "false"

coarse.slang: place in shaders_slang/crt/shaders/guest

#version 450

layout(push_constant) uniform Push
{
	vec4 SourceSize;
	vec4 OriginalSize;
	vec4 OutputSize;
	uint FrameCount;
	float dsize;
} params;

#pragma parameter dsize "Scanline dithering size" 1.0 0.0 2.0 0.10
#define dsize         params.dsize     // Dithering size

layout(std140, set = 0, binding = 0) uniform UBO
{
	mat4 MVP;
} global;

#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;

void main()
{
   gl_Position = global.MVP * Position;
   vTexCoord = TexCoord;
}

#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;

void main()
{

   vec2 tex = vTexCoord;
   vec2 pos = tex * params.OutputSize.xy;
   vec2 dy  = dsize*vec2(0.0, params.OutputSize.w);
   float mixer = floor(mod(pos.x,2.0));
   tex = mix(tex + 0.0*dy, tex - dy, mixer);
   
   FragColor = vec4(texture(Source, tex).rgb, 1.0);
}
6 Likes

@HereticZero I abuse mask 6 with low strength cranked to get a look of bloomy brights with the darks having a lot of separation in phosphors. It looks nice on a smaller laptop screen. Mask 6 works the best for this but has color issues with Dreamcast games. Adjusting the low strength lowers reduces the reasons I like Mask 6.

I like glass.slang but having it as the last pass with a linear filter blur things to much. Nearest looks great but there is a hairline grid that shows up in many games.

Shin01

3 Likes

I kinda figured. Honestly, if the “greening” of everything wasn’t a problem I’d be cranking it up too. Above I have both masks strengths set to 0.50, not to tone it down, but because that’s the maximum I could squeeze out without color distortion. What’s signifigant, however, is that a threshold does seem to exist.

Also, if you know where glass.slang could better be put, I’m all ears.

I had to done it for myself, mixing both crt guest shader first and xbr shader later.

Unfortunately with Venom_Advanced grade only seems to work as the last pass. With something like Hyllian sync or Mame-hlsl Grade works further up the chain.