New CRT shader from Guest + CRT Guest Advanced updates

There are two types of sharpening possible. One at original resolution and one at output resolution.

For first one you can just use a sharpen filter instead of the early stock passes. There is already a sharpen filter at output resolution (substractive sharpness), but the end color is clamped to avoid ringing artifacts. I tested different sharpen approaches at output res, but the current is best balanced. The only (current) drawback is it’s poor at sharpening with high regular sharpness.

2 Likes

Can you give an example? Still a bit confused.

1 Like

You can use either the custom fast sharpen, which sharpens horizontally or the regular version.

shaders = "12"
shader0 = "shaders_slang/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/advanced/custom-fast-sharpen.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"
5 Likes

Found that the NTSC shader does a wonderful job on Handheld emulation. This legitimately allows me to fullscreen these games now instead of running them in smaller windows.

The major changes to make this work right, are

  • S-Video Preset

  • NTSC Phase 3

  • NTSC Blend Mode 0

  • Scanline Type -1

  • CRT Mask -1

Attached is a Before/After pulled from Golden Sun. mGBA core with the settings for color correction set to ON.

6 Likes

New Release Version (2021-08-20-r1):

Notable changes:

  • Quite nicer “Scanline Spike Removal”, shows best of all implementations up today.
  • Smart Edge Interpolation overhaul, a bit more simple but nicer.
  • Fast version preset shader order changed, allowing absolute scaling for bloom passes, which grants a nice speedup for high resolution content.
  • Fastest version balanced a bit, small speedup.

Download link:

https://mega.nz/file/4xxnjSAI#m2G4E_NRyib9lWmPgTR9slRPG39reBDbiooKQH2jedo

Feedback is welcome. :smiley:

12 Likes

Did you forget the NTSC folder in the zip file or is it moved?

1 Like

The shader package is designed to “copy/paste” into the crt folder, having also an easy repository update in mind. The core gdv ntsc shader got an update, but the main preset and base ntsc shaders have different locations, hence the appropriate file selection.

2 Likes

Hey Guest , thank you for all the hard work. Would it be possible to add a scale for how much “Prescale-x factor” variant is applied ? Any variant of the 4 , is too much “effect” even when both horizontal/subtractive sharpness are maximized.

2 Likes

The Prescale-X factor is a simple feature, which allows more dense texture lookups. For example, if the source image is 320px wide and a scaler with 3x scaling is used, then the main pass gets a 960px source to read from, but without ‘prescale factor’ it ignores every 2 of 3 pixel and reads from a 320px grid. Unfortunately the main pass lookup density is obligatory original source size based, so the prescale-x is here to fix this. It shouldn’t be used without a reason though (more with scalers like xBR…). It’s a simple tweak, but does what’s needed to display the added shape/definition.

With your proposal i’m not sure with which circumstances the feature is used and how it should work instead. If the image gets too sharp downsampling can be used to smooth things a bit out.

3 Likes

I see , well I’ll guess I’ll do without, thanks.

1 Like

New Release Version (2021-08-21-r1):

Notable changes:

  • Monochrome color options added (thanks to @TheNamec): BW, Amber, Green.
  • Scanline Spike Removal refined a bit.

Download link:

https://mega.nz/file/9spCHJrS#74OjQIxC-Kd4oIrwUAwkIkT2XMhQZ0aLLHf3BjQeLRU

13 Likes

PSA: You can use SpecialK SDR → HDR conversion on any RetroArch core that supports DX11 or DX12. It works great with Guest Advanced, except enabling interpolation produces white screen. @guest.r I wonder if anything could be done on your side to fix this?

EDIT: Actually, white scree with interpolation was introduced with 2021-08-20-r1 release and has nothing to do with SpecialK.

1 Like

Oh boy, another rabbit hole to fall into that I never knew existed.

1 Like

It would be helpful to state the gfx. adapter type, retroarch video driver used and windows version. At least my old amd adapter seems to be picky with some trivial stuff with glcore, while it works with d3d11. New adapter handles the shaders as intended.

Right, sorry.

GTX 970, 466.77 driver, DX11 driver both in retroarch and cores (It happens in duckstation, pcsx2 and dolphin), latest Win 10. Haven’t checked other drivers yet.

EDIT: Yeah, it only happens in DX11

2 Likes

Does the ‘white screen’ also happen with this version? It’s the first of the two new updated versions, there were not many changes, but nevertheless it’s worth a try.

3 Likes

Yes, both of the releases are affected.

1 Like

Can you try replacing passes with ‘stock’ to pinpoint which one causes it?

4 Likes

Okay, I figured out what causes the issue: halation setting over 0.03 combined with interlacing causes white screen.

3 Likes

Thanks, this was very helpful. I think it should be fixed now.

New Release Version (2021-08-22-r2):

Notable changes:

  • Small bug fixed which could cause white screen with halation + interlaced modes.
  • Edit: improved glcore compatibility with older adapters.

Download link:

https://mega.nz/file/N8gGFKZQ#1-WnZonjoTHhMXCL5IwFYhbnIDLEuszV9ZrahLwyfVs

9 Likes