New CRT shader from Guest + CRT Guest Advanced updates

Maybe you should because I use an LG OLED TV in Game Mode and it’s easily visible for thousands of frames for me, not just 4077 and 4088.

The issue is there from the start to the finish of the video.

Also, I don’t have to squint or focus on anything in particular to see it. I can spot it from across the room on my TV and I can also easily see it playing it back at 1080p on my mobile phone screen.

1 Like

The coloring effect is a consequence of the 2-phase temporal effect. Something similar happens with interlaced artifacts on ‘moving’ images.

As already noticed, it happens only on certain horizontal situations where an alternating color pattern is involved.

It could be vaguely explained as the chroma values are coming into an resonance instead of being normalized (as in the merge fields situation) as a combination of shifted input colors and the phase shift.

This is normal, same with the diagonal chromatic pattern discussed above with 3-phase filtering.

2 Likes

Yo, @guest.r. So I’m finally ready to take a stab at the new updated grade shader. I go and replace the “pre-shaders-afterglow” pass with the new grade shader pass and the image ends up looking a little extra smoother than usual.

I kind of like how it looks even though that wasn’t my intention but I’m trying to figure out why that’s happening, I’ve tried to edit the shader file in about 5 different ways and they all end up looking the same as the screen shot. Is there a reason why I can’t get grade to play nice with your lastest shader update?

Here’s the last shader file I tried to edit:

shaders = "12"
shader0 = "shaders_slang/crt/shaders/guest/hd/stock.slang"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
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/hd/stock.slang"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = "StockPass"
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/hd/afterglow0.slang"
filter_linear2 = "false"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = "AfterglowPass"
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/misc/shaders/grade.slang"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = "PrePass"
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/hd/linearize-hd.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/hd/crt-guest-advanced-hd-pass1.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "Pass1"
float_framebuffer5 = "true"
srgb_framebuffer5 = "false"
scale_type_x5 = "viewport"
scale_x5 = "1.000000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt/shaders/guest/hd/gaussian_horizontal.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = ""
float_framebuffer6 = "true"
srgb_framebuffer6 = "false"
scale_type_x6 = "absolute"
scale_x6 = "800"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "shaders_slang/crt/shaders/guest/hd/gaussian_vertical.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "GlowPass"
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/hd/bloom_horizontal.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = ""
float_framebuffer8 = "true"
srgb_framebuffer8 = "false"
scale_type_x8 = "absolute"
scale_x8 = "800"
scale_type_y8 = "source"
scale_y8 = "1.000000"
shader9 = "shaders_slang/crt/shaders/guest/hd/bloom_vertical.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = "BloomPass"
float_framebuffer9 = "true"
srgb_framebuffer9 = "false"
scale_type_x9 = "source"
scale_x9 = "1.000000"
scale_type_y9 = "absolute"
scale_y9 = "600"
shader10 = "shaders_slang/crt/shaders/guest/hd/crt-guest-advanced-hd-pass2.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = ""
float_framebuffer10 = "true"
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/hd/deconvergence-hd.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"
g_vignette = "0.000000"
GAMMA_INPUT = "2.399999"
gamma_out = "2.399999"
iscan = "0.549999"
SIGMA_HOR = "0.775000"
S_SHARP = "1.600000"
HSHARP = "0.000000"
spike = "1.500000"
m_glow = "1.000000"
m_glow_cutoff = "0.050000"
m_glow_low = "7.000000"
m_glow_high = "7.000000"
m_glow_mask = "0.875000"
SIGMA_H = "0.200000"
SIGMA_V = "0.200000"
SIGMA_HB = "0.250000"
SIGMA_VB = "0.250000"
warpX = "0.050000"
warpY = "0.070000"
csize = "0.035000"
glow = "0.500000"
bloom = "-1.000000"
bloom_dist = "1.000000"
halation = "-0.200000"
gamma_c = "1.400000"
gsl = "2.000000"
scanline1 = "20.000000"
scanline2 = "20.000000"
beam_min = "1.000000"
beam_max = "1.999999"
beam_size = "0.000000"
scan_falloff = "0.650000"
scangamma = "9.000000"
shadowMask = "6.000000"
maskstr = "1.000000"
mask_gamma = "1.500001"
slotmask = "1.000000"
slotmask1 = "1.000000"
slotwidth = "3.000000"
smoothmask = "1.000000"
smask_mit = "0.400000"
deconrry = "0.500000"
deconrgy = "-0.500000"
deconrby = "-0.500000"
post_br = "1.130000"
textures = "SamplerLUT1;SamplerLUT2"
SamplerLUT1 = "shaders_slang/reshade/shaders/LUT/32.png"
SamplerLUT1_linear = "true"
SamplerLUT1_wrap_mode = "clamp_to_border"
SamplerLUT1_mipmap = "false"
SamplerLUT2 = "shaders_slang/reshade/shaders/LUT/64.png"
SamplerLUT2_linear = "true"
SamplerLUT2_wrap_mode = "clamp_to_border"
SamplerLUT2_mipmap = "false"
2 Likes

Could this be the culprit?

1 Like

Nope. Even if I default all of the guest parameters back to default it still looks the same. I’m almost certain it’s something simple that I either haven’t included in the shader file or something else I need to add in to get everything in sync.

2 Likes

I reseted the parameters and with new grade the image was blurry. After using ‘old grade’ everything went to normal. Dunno yet where the catch is, but good news is old grade works.

3 Likes

Yeah it’s probably something minor that needs to be ironed out possibly with the grade shader. I definitely don’t want you adding that into your guest shader at least not yet lol.

Interestingly I tried using the prepend feature to add grade as a first pass without replacing the “pre-shaders-afterglow” and it then works as it should.

shaders = "13"
feedback_pass = "0"
shader0 = "shaders_slang/misc/shaders/grade.slang"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
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/hd/stock.slang"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = ""
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/hd/stock.slang"
filter_linear2 = "false"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = "StockPass"
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/hd/afterglow0.slang"
filter_linear3 = "false"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = "AfterglowPass"
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/hd/pre-shaders-afterglow.slang"
filter_linear4 = "false"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "true"
alias4 = "PrePass"
float_framebuffer4 = "false"
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/hd/linearize-hd.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "LinearizePass"
float_framebuffer5 = "true"
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/hd/crt-guest-advanced-hd-pass1.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = "Pass1"
float_framebuffer6 = "true"
srgb_framebuffer6 = "false"
scale_type_x6 = "viewport"
scale_x6 = "1.000000"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "shaders_slang/crt/shaders/guest/hd/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 = "800"
scale_type_y7 = "source"
scale_y7 = "1.000000"
shader8 = "shaders_slang/crt/shaders/guest/hd/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 = "800"
scale_type_y8 = "absolute"
scale_y8 = "600"
shader9 = "shaders_slang/crt/shaders/guest/hd/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 = "800"
scale_type_y9 = "source"
scale_y9 = "1.000000"
shader10 = "shaders_slang/crt/shaders/guest/hd/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 = "source"
scale_x10 = "1.000000"
scale_type_y10 = "absolute"
scale_y10 = "600"
shader11 = "shaders_slang/crt/shaders/guest/hd/crt-guest-advanced-hd-pass2.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "false"
alias11 = ""
float_framebuffer11 = "true"
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/hd/deconvergence-hd.slang"
filter_linear12 = "true"
wrap_mode12 = "clamp_to_border"
mipmap_input12 = "false"
alias12 = ""
float_framebuffer12 = "false"
srgb_framebuffer12 = "false"
scale_type_x12 = "viewport"
scale_x12 = "1.000000"
scale_type_y12 = "viewport"
scale_y12 = "1.000000"
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4"
SamplerLUT1 = "shaders_slang/reshade/shaders/LUT/32.png"
SamplerLUT1_wrap_mode = "clamp_to_border"
SamplerLUT1_mipmap = "false"
SamplerLUT2 = "shaders_slang/reshade/shaders/LUT/64.png"
SamplerLUT2_wrap_mode = "clamp_to_border"
SamplerLUT2_mipmap = "false"
SamplerLUT3 = "shaders_slang/crt/shaders/guest/advanced/lut/nec-lut.png"
SamplerLUT3_wrap_mode = "clamp_to_border"
SamplerLUT3_mipmap = "false"
SamplerLUT4 = "shaders_slang/crt/shaders/guest/advanced/lut/ntsc-lut.png"
SamplerLUT4_wrap_mode = "clamp_to_border"
SamplerLUT4_mipmap = "false"
3 Likes

New Release Version (2023-05-14-r1):

Notable changes:

  • Mask Zoom feature added (all but fastest version, presets aren’t affected)

Works with scaling factor 1.5, makes some masks more viable for displays with higher resolution. Most other arbitrary scaling factors are prone to artifacts and i don’t want this feature to misbehave. Looks quite nice, adds some vintageness imo.

Download link:

https://mega.nz/file/o1w2AQoZ#NjLRPffKko13EOJ_SiSxOWEFdBrhcOcnXKJHJuDapII

10 Likes

This sounds nice! :slight_smile:

So this is what I see in the shader

Does that mean when I set this parameter to 1 that the mask is scaled to 150%?

3 Likes

Yes, the masks are sized to 150%. TVL rating is “divided” by 1.5. I could implement a custom arbitrary resize ratio, but it doesn’t make much sense due to artifacts which happen.

Here is an example of scaled mask 6:

11 Likes

What does mask zoom do and what is it for? I love the way it looks.

3 Likes

It streches the current mask by 1.5x horizontally. Mask sizes of 1.0, 2.0…skipped this ‘middle ground’ and there could be a small trade off rooting in modern display technology, but i guess it turned out quite nicely. :smiley:

6 Likes

Yeah, I’ve now checked on my LG OLED TV as well and it’s indeed there. It’s visible while looking up and down on both your video and on Guest’s shader when configured for NTSC Composite.
It’s much easier to see on the OLED compared to my old LCD monitor.

It’s also visbile even when Sonic is standing still or the game is paused if you blink rapidly.

But all that looks like normal Composite temporal artifacts to me.

I’ve also tested the built-in Blargg Composite filter from GenesisPluxGX but the combing effect is completely missing from that implementation, even when doing frame stepping with K.

3 Likes

I’m currently playing around with the scaled mask. It can look really cool, can also give a lot of new mask options, especially for 1440p users.

11 Likes

Looks fantastic!! Does it work with 4k? Also which masks can be used with it?

3 Likes

It can be used with any display resolution. Best looking masks are the ones with width 3 or 4.

Best to give it a try, see if it fits into a preset design.

4 Likes

New Release Version (2023-05-17-r1):

Notable changes:

  • two mask zoom factors are available now, 150% and 167%
  • first works better with 2 or 4 width masks, second with 3 width masks
  • small tweak to the slotmask mitigation code

Download link:

https://mega.nz/file/YsAWwCQb#M_fITRb-AsFCjb469pAQ4PbsFt5VdkWcdwwmZU_5qTI

11 Likes

This sounds interesting. I’ll be checking this out later thank you.

Also @guest.r have you figured out what’s going on with the new grade not playing nice with your shader? Dogway suggests that grade should be the first pass, while I understand that I would also like to keep my presets the way they’ve always been with grade being the 3rd pass (I think it’s 3rd or maybe 4th) in my preset shader chain. It’s been working correctly that way up to now so I don’t understand why I would have to switch that up now. I would love to test the new grade out but I’m stuck before I can try anything.

1 Like

My color altering (and afterglow) shader passes are color neutral with default setting, so you can replace an early stock shader with the new grade without issues. It will run a notch slower, but barely noticable.

2 Likes

Ok I’ll give that a try later. If worse come to worse I’m fine with just sticking to the old grade. Kind of didn’t want two sets of “color altering” shader passes in the chain even though yours gives neutral colors with default settings.

1 Like