New CRT shader from Guest + CRT Guest Advanced updates

No problem! Awesome features like this are a godsend.
Now I don’t think we need to rely on the Blargg filters anymore.

It seems the artifact I mentioned is also present on the base NTSC-Adaptive shader in S-Video mode (my screenshots were also in S-Video mode), so it seems it’s normal, after all, and not an issue with your new NTSC chroma scaling feature.

Base NTSC-Adaptive shader in S-Video mode:

Maybe the zigzag is not visible at chroma scaling = 1.0 on my other post because it’s hidden with the filtering or mask.

I also saw the ntsc_cscale is only used in ntsc-pass2.slang but not in pass 1, so am I right in believing this trick is not possible on real CRTs?
I was hopeful this trick could explain how real CRTs have less color bleed than the NTSC shader at default settings.

I notice artifacts in front on the waterfalls if I have the NTSC Preset setting set to Composite or RF, but it’s perfectly smooth in S-Video mode.
It’s strange that I notice the artifacts when moving left/right, but not up/down like you.

2 Likes

A bit quick to right off Blargg aren’t we? There are still a couple things that I’ve noticed that don’t happen when using Blargg. If anything it’s good to have more options but I think I see your point.

The term “artifacts” by itself can be a bit vague. There are different types of rainbow and dot crawl artifacts that are visible when odd and even fields are not averaged as well as when using 2 Phase instead of 3 phase along with a lower NTSC Resolution Scale. Most of these “artifacts” make up some of the main reasons for using an NTSC Shader. I’m talking about recreating behaviour as well as producing crucial effects that were present in real hardware, especially Sega hardware.

What I was referring to specifically was a type of combing/interlacing artifact (without the sawtooth edges) that appears when looking up or down in real-time when in front of the waterfalls in Sonic The Hedgehog. This doesn’t seem to occur when using the Blargg SNES filter and I don’t think it occurs when using the Genesis one either. I’ll try to make a video and also see if I can get some screenshots of it soon.

Tap on image then zoom in for best viewing. Desktop users, right click then Open in New Tab, then press F11 for FullScreen. Non 4K users, zoom in until it looks correct.

Click here to download video

3 Likes

Haha, yeah I guess I was quick to dismiss Blargg’s filters. In fact, I don’t know Blargg’s filters that well. There might be NTSC particularities that are better emulated there.
But this NTSC chroma scale feature from Guest solves a big problem I had with NTSC.

You’re right. More specifically, the artifact I see when moving left/right is also visible in a still frame. It only becomes smooth when the game is running normally but the camera is stopped. Here’s what it looks like:

It’s more noticeable in the upper part.

But no, when moving the camera up/down, I can see no obvious artifacts. It seems smooth, the same as when it’s stopped.

3 Likes

I really like this mask 11 for GBA games! But there is something that i do not understand tho, as you can see in the picture the mask seems gone around the dialogue box when i go to the menu and when i press B to go back to the game the mask appears for a brief second, is this a normal behavior? Or is it a glitch? I’ve noticed this happens mostly in white white/bright backgrounds.

1 Like

Hey @ledoeye!

The issue you are showing is most probably related with increased game related brightness ‘flashes’ when entering the menu etc. You can be more sure if you test it with another game.

Brightness can influence mask strength in guest-advanced, this is one of the basic ideas of image representation, but if it’s too much you can also increase mask strength, lower bloom etc…

Otherwise it shouldn’t be a shader related glitch, but thanks for mentioning it anyway.

2 Likes

That’s certainly caused by the fact that the text box is very bright, which means the bloom is hiding the mask (a necessity to compensate for the lack of brightness caused by the mask).
The reason why you see a stronger mask during the transition when you press B is because the game fades the image to a darker color, which reduces the bloom and makes the mask more visible.

One trick many users use to avoid this is set the TV/monitor’s brightness to the highest possible value, and then reduce the amount of bloom.
But of course, this can be cumbersome if you use the TV/monitor for more than retro games.

Another solution is using HDR with the Sony Megatron HDR shader, which I believe is the only CRT shader capable of HDR. But that’s a different shader and comes with it’s own set of restrictions.

2 Likes

Sorry @Cyber. There are no notifications for edited posts, so I didn’t know you added screenshots and a video. It’s better if you make a new post so that we get notified.

But thank you for the video! It was much easier to understand what you meant now.

On your video (at the realtime part), I can see the artifacts when you move left/right, but not when you look up/down. But you mentioned that you can see combing artifacts when looking up/down? Or did I get that wrong?

Using Guest’s shader I seem to get the exact same artifacts as your video. They’re visible when moving left/right, but not visible when looking up/down. And also always visible in slow-motion, ofc.

1 Like

Yup it was indeed the Post Brightness / Bloom. I increased it a bit because i’m gaming on a Sony Trinitron CRT and these monitors while being amazing they get dim with CRT shaders which is a shame cause the colors on these things are out of this world. Thanks @guest.r

4 Likes

Thanks for the info :+1:

2 Likes

Perhaps, I might have a more discerning eye where that is concerned but the first time I noticed it was when I was stoped at the waterfall and looking up and down and it’s definitely present in the video but it’s interspersed with normal looking frames.

Perception differs from person to person so some might have to look harder but it wasn’t hard for me to notice as someone who by now probably has a well trained eye due to what I’ve been doing for the last couple of years.

The slowed down part of the video is just me manually advancing frame by frame and it can be seen there so that proves that it’s present in real-time as well.

1 Like

I see what you mean. Sometimes I see it in your video.

But I found it strange that it’s only sometimes and always on the same moments, so I went on and watched the video frame-by-frame on those moments when I see it and I noticed your video has frame-skips, for example at 1:07 and 1:21. There are probably more but I did not check further. A frame-skip makes the combing effect visible.

Do you constantly see the combing when looking up/down? Or is it sometimes? Make sure you’re not having frame-skips during emulation, or you’ll definitely see the combing even when it shouldn’t be there.

There aren’t any frame skips in my video nor in the emulation. A frame by frame advance after first pausing the emulation then pressing the K key would display all frames. If the emulation appears to stop or pause, it would probably be because I either paused the emulation or the game itself.

It’s not a sometimes thing.

The purpose of this demonstration and reporting was to bring this to the attention of @guest.r and I think I’ve done enough to communicate and convey what I’m experiencing.

The video definitely does. I double checked. For example, you can see that frame 4077 and 4088 are duplicates, which makes the combing visible on the video when it wouldn’t in a normal scenario.
It’s possible this double frame came from the recording software, or it could have come from the emulation itself.

But regardless, yes! After looking carefully, l can definitely see the combing faintly when looking up and down indeed. :slightly_smiling_face:
And I can see it on both your video and on Guest’s shader in Composite mode. It’s easier to see on the darker part of the background mountains. And I can only see it if I focus my vision on the square grid next to the waterfall.

I’m checking this on my pretty old LCD monitor which has horrible response time, which might mask the effect. It’ll probably be easier to see on my OLED TV, so I’ll make sure to check there and report back.

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