New CRT shader from Guest + CRT Guest Advanced updates

That was my mistake I should have mentioned that grade wasn’t the issue at all, in fact I went replaced grade with a stock pass in my custom preset to test it and got the same result with stock. It’s unfortunate that those two parameters can’t get back ported to the other afterglow pass. The only reason I replaced the “preshaders” pass with grade is because they both essentially use the same parameters like color space, vignette, etc. I just wasn’t aware “afterglow strength” and “afterglow saturation” were apart of that pass. In any case if it can’t be ported over it’s not much of big deal. I thank you for trying to help me get to the bottom of that the most

2 Likes

@guest.r could you just port the needed things into grade? Or is that a no go as well?

I mainly ask because it’s a super commonly used shader with your chain.

4 Likes

I had a feeling you would chime in lol. Grade is pretty much missing those afterglow settings if you look at it the reverse way

2 Likes

I’ll try to look at the code in a bit, but I haven’t been doing well so idk if it’ll actually happen.

3 Likes

New Release Version (2022-01-10-r1):

Notable changes:

  • scanline saturation brightness loss and oversaturation compensation added
  • bloom effect doess less over-saturation
  • slightly improved halation
  • grade with afterglow support added in the shaders/guest/advanced/grade folder

Download link:

https://mega.nz/file/psp3wSoS#OF-0ZdxwYq38v3GYGxM9KnUFKUZ7TTNiLqgNEDiTYRQ

Feedback is welcome.

The ‘custom’ grade should be more or less used to replace the pre-shaders-afterglow pass.

15 Likes

Thanks for the update! Can you elaborate as to the difference in the halation now? Let’s say I currently have a setting of 0.05, what setting would I need to use to get it back to where the way it is currently or is it a different type of change?

2 Likes

The halation is now a bit less invasive (25%) spot on brighter colors, shifting more focus on the effect they emit. But you should be still fine with 0.05.

4 Likes

Thanks, a lot! I’ll see when @HyperspaceMadness updates it in Mega Bezel Reflection Shader!

3 Likes

This update gave me EXACTLY what I wanted, you came through once again @guest.r. The one thing I noticed right away is that the first two stock passes seem to be a part of the shader chain passes now, usually I get rid of those first two stock passes but when I tried to take them out this time my custom preset shader failed to load, it seems it won’t work unless those stock passes are there but that’s ok they’ll just stay there, that doesn’t affect anything at all. Afterglow now works the way it should in my preset and now it’s time to update my last post, thank you once again for this amazing shader.

7 Likes

Wouldn’t it be better to put that stuff on github? :stuck_out_tongue:

2 Likes

I already have an older version on Github, will update to latest eventually.

OTOH such dl links have it’s advantages, which also include a simple but very efficient version history. Don’t want to cancel this atm…

2 Likes

I’ve been using the -fast variant for a couple days now. (It looks identical to the normal preset for me, and it’s also faster than geom-deluxe.) It’s pretty good! The -ntsc variant gives a nice analog look to the image. But it’s rather heavy on GPU. Any plans on having -ntsc-fast and -ntsc-fastest preset to complement the normal ones?

3 Likes

Hey there! :smiley:

Fortunately NTSC Fast version is not this hard to implement, it can be also very nice for high resolution content. ‘Fastest’ version uses some tricks which makes it impossible to merge with ntsc shaders. The speed gain is quite good. The way this new ntsc version works is also a bit different, but should be fine.

As always, feedback is welcome…

New Release Version (2022-01-14-r1):

Notable changes:

  • ntsc - fast version added
  • new bloom variation (as negative value of bloom)
  • some small fixes and changes

Download link:

https://mega.nz/file/ooYEDTiR#PA2PYpxTmYvMQW2ByqTJFWq2gDFXhryr8ZO6dQ_f3MY

Edit:

If somebody likes a ‘messy’ preset: (put where preset’s are saved) :grinning:

shaders = "12"
shader0 = "shaders_slang/crt-guest-advanced/shaders/guest/fast/jinc2-dedither.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-guest-advanced/shaders/guest/fast/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-guest-advanced/shaders/guest/fast/pre-shaders.slang"
filter_linear2 = "true"
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-guest-advanced/shaders/guest/advanced/ntsc/ntsc-pass1.slang"
filter_linear3 = "false"
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-guest-advanced/shaders/guest/advanced/ntsc/ntsc-pass2.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = ""
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-guest-advanced/shaders/guest/fast/convert-ntsc.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "PrePass1"
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "source"
scale_x5 = "0.500000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt-guest-advanced/shaders/guest/fast/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-guest-advanced/shaders/guest/fast/crt-guest-advanced-ntsc-pass1.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "Pass1"
float_framebuffer7 = "true"
srgb_framebuffer7 = "false"
scale_type_x7 = "viewport"
scale_x7 = "1.000000"
scale_type_y7 = "source"
scale_y7 = "1.000000"
shader8 = "shaders_slang/crt-guest-advanced/shaders/guest/fast/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 = "640"
scale_type_y8 = "source"
scale_y8 = "1.000000"
shader9 = "shaders_slang/crt-guest-advanced/shaders/guest/fast/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 = "480"
shader10 = "shaders_slang/crt-guest-advanced/shaders/guest/fast/crt-guest-advanced-ntsc-pass2.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-guest-advanced/shaders/guest/fast/deconvergence-f.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"
quality = "2.000000"
prescalex = "3.250000"
warpX = "0.040000"
warpY = "0.050000"
csize = "0.050000"
bloom = "-1.100000"
gamma_c = "1.200000"
shadowMask = "3.000000"
maskDark = "0.300000"
maskLight = "1.200000"
slotmask = "0.500000"
slotmask1 = "0.700000"
slotwidth = "1.000000"
slotms = "2.000000"
deconrr = "1.500000"
deconrb = "-1.500000"
deconrry = "1.500000"
deconrby = "-1.500000"
decons = "-1.000000"
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4"
SamplerLUT1 = "shaders_slang/crt-guest-advanced/shaders/guest/advanced/lut/trinitron-lut.png"
SamplerLUT1_linear = "true"
SamplerLUT1_wrap_mode = "clamp_to_border"
SamplerLUT1_mipmap = "false"
SamplerLUT2 = "shaders_slang/crt-guest-advanced/shaders/guest/advanced/lut/inv-trinitron-lut.png"
SamplerLUT2_linear = "true"
SamplerLUT2_wrap_mode = "clamp_to_border"
SamplerLUT2_mipmap = "false"
SamplerLUT3 = "shaders_slang/crt-guest-advanced/shaders/guest/advanced/lut/nec-lut.png"
SamplerLUT3_linear = "true"
SamplerLUT3_wrap_mode = "clamp_to_border"
SamplerLUT3_mipmap = "false"
SamplerLUT4 = "shaders_slang/crt-guest-advanced/shaders/guest/advanced/lut/ntsc-lut.png"
SamplerLUT4_linear = "true"
SamplerLUT4_wrap_mode = "clamp_to_border"
SamplerLUT4_mipmap = "false"
7 Likes

Thanks! Performance is about doubled with ntsc-fast. It does look quite different though. Is the NTSC implementation also altered? crt-guest-advanced.slangp and crt-guest-advanced-fast.slangp look identical here. After I tweaked the normal preset to my liking:

#reference "../../shaders/crt-guest-advanced/crt-guest-advanced.slangp"
interm = "0.000000"
bloom = "0.200000"
brightboost1 = "1.550000"
beam_max = "0.800000

Simply swapping #reference to crt-guest-advanced-fast.slangp produces the exact same image here.

This is not true with -ntsc vs ntsc-fast. It seems slightly blurrier and washes out shadow details. My naive mind would think that if crt-guest-advanced and crt-guest-advanced-fast look identical, then adding the same NTSC implementation to them should also produce the same image.

I suppose it’s not possible to have the same quality NTSC implementation but with just the CRT shaders being the faster implementation?

Looks like I found my Atari 2600 preset :stuck_out_tongue:

2 Likes

A notable difference may happen because the first shader in the ntsc-fast chain is the jinc-dedither, which also allows sharper settings and still resolves dithering patterns. I included it because it does a very good job there while still impacting the rest of the image in a very modest way.

Perhaps replacing this pass with stock.slang will bring the results closer.

Second notable change in the default ntsc blend mode. While with normal version it’s 1.0, the fast goes with a sharper 0.0.

Lastly the fast version lacks some of the slower code, like scanline gamma, blend mode 2.0…but otherwise it’s still very versatile.

3 Likes

I believe this is not necessary. One of the main reasons I use NTSC shaders is because they get rid of dithering. A special de-dither shader seems only useful when not using an NTSC shader.

Do you think it’s a good idea to have the full quality NTSC in the ntsc-fast preset, but just based on top of -fast.slangp, and then have the current ntsc-fast preset renamed to ntsc-fastest?

Edit:
I tested performance of crt-guest-advanced-ntsc.slangp between the three NTSC blend modes 0, 1 and 2. They all perform identical for me (121FPS). Same for ntsc-fast.slangp, where modes 0 and 1 also perform exactly the same (230FPS.)

Edit 2:

Indeed. I did that, and at least with blend mode 0, the results are almost identical, except for a minor color temperature difference.

The current preset:

shader0 = shaders/guest/fast/jinc2-dedither.slang
filter_linear0 = false
scale_type0 = source
scale0 = 1.0

Gives this:

Replacing it with:

shader0 = shaders/guest/fast/stock.slang
filter_linear0 = false
scale_type0 = source
scale0 = 1.0

Gives this:

Almost identical, except for the slight color shift.

2 Likes

Oh, btw, nothing changes if I completely remove the first stock pass. What’s the reason of having two stock passes?

1 Like

This can be a bit tricky if certain blending modes are used or ntsc resolution scaling is increased. Some games don’t use dithering, but i guess many users still like a touch of artifacting and fringing while looking at a sharper image. The default ntsc effect looks quite soft though. Having both options is a nice bonus.

This can depend on the compiler too, since blending mode 2.0 brings lots of vec3 pow calculations at viewport resolution. The code paths are if/else separated, in many cases the slowdown can be general though.

Nevertheless, thanks for the feedback, i think i can still improve some features/issues. :smiley:

Uhh, for simpler adding of additional shader passes, like xbr(z), grade, dedither… Standard presets need at least one stock pass, or custom pre-passes are virtually impossible because the pre-shader must access frame history buffers, which are immune to changes.

1 Like

New Release Version (2022-01-15-r1):

Notable changes:

  • NTSC - fast version changes only
  • jinc2 dedithering is now a ‘parameter’ option
  • basic sharpening added
  • NTSC Blend Mode 2.0 added
  • Edit: small but notable fix for ‘lut colors’ with fast versions

Download link:

https://mega.nz/file/pgRwBB5S#Q6ZwWY4JK0MV57xcJjLCrAJVlmKOyQqZb2lGKvPKuX8

9 Likes

Thanks. Especially for ntsc blend mode 2 in the fast preset! Looks great, especially in Sega MD/Genesis games.

Btw, disabling Jinc2 dedithering in the parameters doesn’t give any perf benefit. Deleting the shader pass from the preset does, however. Not a big one though, just 1% difference (like 336FPS vs 332FPS,) so it doesn’t even really matter. Perhaps this is due to my weird setup though. I don’t have a weak GPU, it’s just that I have locked the core and memory clocks of my 980 Ti to very low values in order to keep it passively cooled :stuck_out_tongue:

Great work on this shader though! ntsc-fast looks even better than presets/crt-geom-deluxe-ntsc-adaptive.slangp (which I’ve been using for a while now) but is faster.

Is there any documentation for the options somewhere? For example Display Gamut, CRT Profile, LUT Colors, LUT Size, and Sega Brightness Fix.

Also some of the options have more possible values than the label indicates. Like CRT Profile and CRT Mask.

1 Like