New CRT shader from Guest + CRT Guest Advanced updates

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

Is it possible to add the overscan option also to the fast presets? Or would it slow down the shader? (It’s kinda hard to imagine that it would though.)

2 Likes

Will be added in the next release. Also need to fix some things…

4 Likes

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

Notable changes:

  • Overscan options added to fast, fast-ntsc and hd versions
  • scanline saturation parameter range increased (for stronger mask falloff/decay)
  • scanline falloff parameter added

Download link:

https://mega.nz/file/gkwiQKhK#MxdXdvGjjsCDuXjZ9hn2UvKGCl1FNMofxOCk8r431tQ

11 Likes