New CRT shader from Guest + CRT Guest Advanced updates

I’m still working/slacking on a new ‘readme’ for the new versions, but the older description describes some color options quite nicely:

Otherwise some more reading on the mentioned topics:

LUT Colors

Using of lut’s basically enables a different color palette. But i didn’t want to make it too ‘interesting’, so the current lineup consists of pushing trinitron phosphors, old lut for trinitron phosphors, a nec multisync display look (was very popular on the amiga scene) and a lut for an older NTSC standard.

LUT Size

‘3D’ luts can be of different sizes/qualities. Current lut png’s are 32 pix wide, but if you find/create a custom lut you want to use it could be sized differently. Endorsing the best quality the size of a lut of 64 is also possible.

Sega Brightness Fix

Sega MD games (?) usually don’t push max RGB component brightness to 255, but it usually stops with 239. Enabling the Sega Brightness Fix basically fixes the brightness range to the full potential. It can be very useful if someone creates a preset, which works nicely with his display and Sega games could look too dark.

5 Likes

I’m adding a nice ntsc-fast version preset, which i can be a starting point to some directions. Should work nice for 16 bit systems…

shaders = "12"
shader0 = "shaders_slang/crt-guest-advanced/shaders/guest/fast/custom-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 = "1.000000"
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"
do_dedither = "1.000000"
CS = "2.000000"
TNTC = "4.000000"
WP = "-20.000000"
quality = "-1.000000"
ntsc_phase = "3.000000"
ntsc_scale = "1.749999"
cust_fringing = "1.000000"
cust_artifacting = "1.500000"
nsharpen = "0.250000"
blendMode = "2.000000"
prescalex = "1.500000"
bloom = "-0.500000"
halation = "0.100000"
gamma_c = "1.200000"
shadowMask = "7.000000"
maskstr = "0.550000"
slotmask = "0.550000"
slotmask1 = "0.750000"
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" 

Screenie:

8 Likes

Currently i’m finishing a new version called ‘HD’. The main benefit is a custom sized and adjustable filter, which can filter any input resolution to both, horizontal and vertical direction. It’s main advantage is that the filter size can be very large, up to 32 original pixels.

Screenies:

10 Likes

Greetings @guest.r!

I’ve been having an issue with Shadow of The Beast for TurboGrafx-CD.

During the attract mode several full screen still images are cycled while some awesome CD background music is played, however during the transitions between stills the music pauses briefly and it totally messes up the timing and immersion of this simple but enjoyable part of this game.

This does not occur on real hardware.

I’ve tested it with redump images both CHD as well as uncompressed. Turned CD Cache on and off. With the image on an SSD as well as mechanical hard disk drive, it still occurs no matter what.

During my troubleshooting, I uncovered some interesting information with regards to performance and behaviour of different CRT Shaders including our beloved HSM Mega Bezel Reflection Shader.

Results of testing:

I disabled Video Shaders and it went away.

I use HSM Mega Bezel Reflection Shader but I didn’t suspect this as a contributor due to the fact that my GPU usage maxes out at 84%, while my CPU usage tops out at 7% during this intro sequence. I also have Run Ahead and Frame Delay enabled so I’m going to disable those or reset them to default and see what happens.

Disabling Run Ahead with the Shader running didn’t make a difference. Neither did Disabling Run Ahead plus resetting Frame Delay to 0 and turning off Automatic Frame Delay.

Going to try the Performance Shader Presets now.

With the Performance Preset in use, my maximum GPU usage drops to 76% (but it’s mostly tops out at 69%) while my CPU usage tops out at 4%

This is with Run Ahead and Frame Delay still disabled.

When I switched to HSM Mega Bezel Reflection Shader’s Potato base preset the issue is about 80% gone. There are still some signs of dropouts but they’re a lot shorter.

Max GPU usage is at 31% while CPU usage tops out at 5% (but it’s mostly at 1 to 2%)

After a while of looping its not as noticeable but I can still see the Frametime spikes and FPS drops and hear the slight pauses in the music during the attract mode scene transitions occasionally.

Tried Newpixie-CRT, no issues with dropouts whatsoever, smooth Frametime and framerate graph with max GPU usage at 17% and CPU usage topping out at 3%.

When I load CRT-GUEST-ADVANCE it’s probably a little better than when I tried the HSM Potato Preset. GPU usage maxing out at 27% and CPU at 2%.

CRT Royale-Composite seemed to have slightly less dropouts than CRT-GUEST-ADVANCE despite having similar GPU and CPU usage.

Lastly CRT-Geom Deluxe had a more consistent GPU usage figure of 40% with my GPU ClockSpeed remaining at a more or less constant 2000MHz and CPU usage at 2% Max and the issue was basically non-existent.

Even after playing around with some of the Shader Parameters in CRT-Geom Deluxe which caused my GPU Usage to increase to 59% Max and my CPU Usage to top out at 3%, the intro music in Shadow Of The Beast still played on without skipping a beat!

I tried setting my GPU to Prefer Maximum Performance but the problem was still there when I repeated using my HSM Mega Bezel Reflection Shader presets.

All of these tests were run with CD Cache Enabled in Beetle PCE Fast’s Core Options.

All of the test I ran besides the Potato and my initial tests using my presets were performed with the stock versions of the Shaders/Presets available in the Shaders_Slang folder unless otherwise indicated. I’ll test with another system. I’m running a mere Gefore GTX 1070.

After updating my Realtek Audio Drivers from the Gigabyte Website (since for the longest while Realtek seems to no longer be supplying their latest drivers to end users), I remembered that I don’t use Realtek Audio at all. I use nVIDIA HDMI Audio. My main PC is a HT/Gaming/Living Room PC hooked up to a receiver and a 4K TV via HDMI.

My nVIDIA HDMI Audio Drivers are as new as can be. They were probably updated about a day or 2 ago.

Just ran some tests on some more Shaders/Presets. RTSS Frame Limiter was off for these:

Guest Dr. Venom 2 37%, 2% - Audio Dropouts noticeable

Guest Dr. Venom 25%, 2% very slight, hardly noticeable but it’s there. After a few cycles, the FPS drop is about 2fps - the spikes are there but it’s even less noticeable.

Guest Dr. Venom Fast 18% 3%. Spikes can be seen, audio dropouts noticeable.

crt-guest-sm.slangp 23%, 3% No audio hitches for the most part but you can see the tiny blips on the RTSS Frametime and FPS Graphs plus you can hear an occasional audio dip but it’s extremely slight. Flawless after some cycles.

The percentages are max GPU and CPU usage figures during the test sequence respectively.

The problem seems to occur exactly between the image transitions. Something seems to be stalling at the exact moment the screen fades completely to black. Depending on the preset used its enough to desync the audio.

By the way, I switched on CRT-Geom-Deluxe in between and it was flawless, not even a spike. Of course that doesn’t do half as much as what CRT Guest Advanced can do but the GPU usage is around double that of Guest Shaders, yet the audio doesn’t budge.

Here’s a video clip showing the issue:

Shadow of the Beast TurboGrafx-CD Intro CD Audio bug.m4v

1 Like

That’s an interesting issue, but i definitely cannot help with it, since the chain of events, from emu core to post processing, including sound, is quite long. I guess that it’s repeatable with other heavier shader setups, like royale, dreamscape etc. Maybe you could try a different sound driver, like dsound or wasapi, see how it goes.

1 Like

I can try but the thing is its very rare. The vast majority of TurboGrafx-CD games don’t have this issue at all. As a matter of fact this is the first and only game that exhibits this issue so far. One thing that might be unique to this game is that each image in the intro sequence is at a different resolution and you can see the mode switching creating some lag in the video I made.

1 Like

that probably means it’s having to recompile the shader at each transition. You might try one of the nnedi3 presets, which also have very long compile times, and see if they have the same issue.

2 Likes

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

Notable changes:

  • HD version added
  • It’s quite versatile, but it’s put to best use with sources with higher input resolution
  • small fix for bloom with fast version

Download link:

https://mega.nz/file/AtgUgShT#Z_IjRDNQam8fVfYabKoNQMegN56GONx9kDGYOGp8dUo

5 Likes

I tested them all. Here are my findings:

Percentages are max GPU usage and CPU usage observed respectively during my test runs.

nnedi3-nns16-2x-luma.slangp
40%, 3% 
Not a hitch


nnedi3-nns16-2x-rgb.slangp
34%, 3% 
Not a hitch


nnedi3-nns16-4x-luma.slangp
40%, 3% 
Not a hitch


nnedi3-nns32-2x-rgb-nns-4x-luma.slangp
49%, 3% 
Very slight dips could be noticed in the audio but they stopped almost completely after a couple cycles of the images.


nnedi3-nns32-4x-rgb.slangp
91%, 3% 
Hardly any dips or hitches, almost perfect, noticebly better than nnedi3-nns32-2x-rgb-nns-4x-luma.slangp despite the peak GPU usage being so high.


nnedi3-nns64-2x-nns32-4x-nns16-8x-rgb.slangp
100%, 3% 
Constant 26fps and 100% GPU usage, everything running slow, garbled audio throughout


nnedi3-nns64-2x-nns32-4x-rgb.slangp
100%, 3% 
Many dips to 57 fps depending on the resolution of the image not necessarily during the transitions. Lots of hitching, slowed and garbled audio with some listenable audio in between.

Using a different audio driver didn’t seem to make a difference.

Thanks for the suggestions @hunterk & @guest.r

2 Likes

I’m working on something now, and fixing transitions is a bit pita. :grin:

What do you guys think?

5 Likes

I always keep the edge fuzziness and corners disabled since my overlay handles that. I noticed that if you set corner roundness to 0, some values of edge smoothness will darken the whole image. This is true for other shaders as well.

But corner roundness 0 with edge smoothness 700 seems to always work fine. So it’s more like a nitpick than anything.

2 Likes

Yeah, old implementation has a issue or two. That’s why i’m working on a new version. Looks nice for now. :grinning:

3 Likes

New Release Version (2022-01-22-r2):

Notable changes:

  • New implementation of Border and Corner functionalities
  • some small tweaks
  • edit: small bugfix

Download link:

https://mega.nz/file/4wYV2YzZ#sy-0joX2CpBkAo-SOvY13K7oYIMlWPAdXg_aEeLSpZg

10 Likes

What a G!!

Thanks man, I’ll check this out as soon as I get a chance! Really hyped for this update.

Guess I should work on a new wish list for the shader?! :joy:

2 Likes

I’m getting some really nice VGA monitor results with this shader. I’m loving this shader more and more :smiley:

One bug though (but you probably already know about it): when setting Border Size to 0, the image turns completely black.

6 Likes

Thanks for the bugfind, my adapter is very ‘tolerant’, didn’t show anything odd. :upside_down_face: Nevertheless, the dl link is updated now.

4 Likes

Yep, it’s fixed now.

3 Likes

My previous preset still looked a little too sharp, so I’ve been messing around with the settings, to achieve some sort of composite effect and some sort of pixel blending without using NTSC shaders. And playing with downsampling worked, I think! Here’s a reference, the first image is guest advanced at standard settings, the second my experiment (look at the lightning on the rock and at the light blue of the koopa’s eye). Downsampling is at 0.20 for both x and y axis. Let me know what you think of it and if you have an alternative.

4 Likes

Hey there!

Yeah, vertical smoothing can be a bit problematic, so you can use some shaders instead of the first stock shaders in the preset.

I’m getting decent results with blurs/sharpsmoother.slang combined with dithering/jinc deditherer. Otherwise can you cambine ‘pre-shaders’ with downsampling too.

To a degree, new (negative value) bloom and halation do some general smoothing, but you usually need more intense masks for a good look.

3 Likes

Composite is not necessarily blurry or soft in my opinion, VHS hooked up through composite is relatively soft and blurry though. I prefer the sharper, cleaner image. The second looks out of focus to me and that might bother my eyes if I were to try to play using those settings. Maybe you can try focusing on the slight colour blending/mixing/fringing aspects to achieve your composite look, while leaving the sharpness as intact as possible or at least cutting back quite a bit on the blur that was demonstrated in the second pic for the best of both worlds.

This is just my opinion, I don’t think what you did is wrong or bad in anyway. Great job and look on this preset! Kudos to @guest.r as well!

2 Likes