Yes, I’ve read through the issue thread. I’m hesitant to add an option for only one core, but I expect the per-system configuration is going to evolve when I get to having different filters for different systems.
I thought GPX was going to patch their palette for that. Am I hallucinating?
My opinion: avoid individual hacks; too much time to debug and maintain when emu authors should update their code. I found an issue with Geolith’s palette, alerted the author and he fixed it.
As Mask of Destiny explained, there is nothing complicated, it’s just that I never took the time implementing it (it also requires some design changes in vdp rendering code). This will be done someday, eventually…
Hello. I really like this shader, but I’m having an issue using it with the dolphin core. It just zooms in on a corner of the screen. Is there a fix for this?
Edit: so this doesn’t happen on glcore, just vulkan.
I think this is some sort of bug that gets triggered in Retroarch. I’m not able to reproduce it, so I’m not sure if I can fix it. Dolphin works fine with Vulkan for me. Sorry I can’t be more help.
I’ve made some updates to crt-beans. You could consider this to be kind of a beta before I create a PR for the slang-shaders repo. You can download it here or at the direct link to the archive.
Performance improvements
I’ve made some performance improvements, mostly in the scanline simulation. It now uses a separable estimate of the scanline model integral. This allowed me to unify the scanline simulation between the “fast” preset and the main presets, which makes the fast shader look better. crt-beans-fast is now basically the same as crt-beans-vga but with a slightly different configuration and no glow or dither. The glow is pretty expensive.
Here are some benchmarks with comparisons to other popular shaders. This is a 320x240 input and a 2880x2160 output. All presets are used with default settings. This is running on an RX 9060 XT.
| Preset | ms/frame ↓ | FPS |
|---|---|---|
| zfast-crt | 0.327 | 3,053 |
| crt-beans-fast | 0.499 | 2,004 |
| crt-easymode | 0.610 | 1,640 |
| crt-beans-vga | 1.185 | 844 |
| crt-beans-rgb | 1.471 | 680 |
| crt-beans-s-video | 1.475 | 678 |
| crt-beans-ntsc | 1.642 | 609 |
| crt-guest-advanced | 1.936 | 517 |
I’m hoping to make some more minor performance improvements.
Pluggable analog simulation
There are now 4 different frontends:
- No analog simulation
- RGB
- S-Video
- NTSC
Each of these can be swapped in front of the rest of the chain (starting from scanline_horizontal.slang). The presets are mostly self-explanatory, except that crt-beans-fast and crt-beans-vga use no analog simulation. There are other combinations that I haven’t created presets for. For example, there could be a TV-like preset with no analog simulation (similar to most of the existing CRT shaders). RGB, S-Video, or NTSC could also be combined with the “fast” version if you still want analog simulation but don’t want the expensive glow.
It’s possible, theoretically, to combine these with other shaders as well, similar to how ntsc-adaptive is used. I haven’t actually tried it and some might need some slight modifications. The main things to take into account are that they stretch the horizontal width and that they output linear RGB (so gamma correction should be skipped).
NTSC updates
The NTSC frontend now:
- Supports interlacing
- Has had some bugs fixed
- Has a 2D adaptive comb filter as the default option, in addition to a notch filter and a 3-line comb filter
- Supports the following systems:
- NES
- Master System
- PC Engine/TurboGrafx-16
- Genesis/Mega Drive
- SNES
- Saturn
- PS1
- N64
- Standard NTSC (appropriate for later consoles, normal TV, etc)
It’s important to turn off any sort of upscaling with most of the systems, because the input resolutions are used to figure out which mode the system is in.
I’ve matched the behavior of the different systems as much as I think is practical. PCE is a particularly difficult case because each game could choose 262-line or 263-line output, which changes the chroma subcarrier behavior significantly. There’s no way to tell from the core output which one a game has set, so I always assume 263-line output, which looks much cleaner. I think most games used that.
Parameters
There are some new or slightly changed parameters. They are all documented here.
Screenshots
The main visual change is the NTSC code and that the fast preset looks more like the rest. Here are a couple NTSC screenshots: