The Scanline Classic Shader

3DO is pretty much finished and will be in the next update. I have also been able to get the shaders to be stable at all of the PSX’s many video modes. The Saturn has two separate video clocks however, which is a bit weird, so cannot work without some modifications to how timing is derived. The N64 should be trivial.

3 Likes

Do you plan on making 1080p presets in the future?

I have used the presets on 1920x1200 and they seem okay to me. Maybe some aliasing with the mask, but not too bad. Do you think dedicated 1080p presets would be useful?

1 Like

Hmm, I’m not an expert on CRT masks but I was intimidated by the folder names having tags like 4k uhd, and couldn’t tell if I’m getting the “intended” look or not.

Maybe instead of dedicated 1080p, an auto fit to resolution setting would be better?

I would start with trying out the presets on the resolution you want and see how it goes. If there are any issues or you think something looks off, let me know. I was thinking for 1080p, the presets would be nearly the same but use a lower TVL, maybe different mask diffusion. But I won’t be working on them for a while.

1 Like

The next update will be able to support shader subframes (for DOUBLE_REFRESH and phosphor). However, performance requirements are incredibly high, too high for my own system. Maybe a 4090 can run it :laughing:

4 Likes

Version 7 is available and also is in the RetroArch distribution.

6 Likes

A couple notes:

The presets are designed for native resolution. Some cores allow you to render the internal framebuffers at a higher resolution. These options should be disabled before applying a preset. The HDTV presets can accept an input size of up to 1125 pixels high, but I don’t test anything outside of native resolution and there may be issues with scaling due to H-sync timing derivation.

Some cores use hardware acceleration for rendering and this will require timesharing with the shader rendering. If you are running this type of core and encounter slowdowns, you can determine if the shader is the cause by disabling the video shader and seeing if full speed can be achieved. With recentish hardware a hardware accelerated core should not be needed as long as you are running native res until you get to the N64 or so (i.e. you can use the software Beetle PSX renderder).

1 Like

The next version will have HDR support. The other SDR modes will also have better tone-mapping. Default settings will result in a much brighter image.

3 Likes

If you don’t want to wait for the Version 8 version to become available in the RetroArch downloader, you can get the packages here:

3 Likes

As an aside to the HDR stuff, i have also noticed that my 2080’s fans go nuts and i drop frames down to about 80 fps when using your shader, unless i enable the shader’s “Bypass Glow” Debug setting, at which point it chills and i get the full 120 fps.

Not sure if that glow effect is just that heavy, if it’s surfacing some normally hidden issue with my specific GPU, or what, but i thought you might want to be aware.

1 Like

Yeah that’s largely because mipmapping is broken on D3D12 so I can’t use it. It’s a heavy function applied to the entire output resolution.

1 Like

This is a good time to discuss the MASK_DIFFUSION parameter.

MASK_DIFFUSION

The diffusion of the mask dots is an important part of maintaining SDR viewing brightness and eliminating moiré patterns without needing to rely on subpixel effects. The baseline view is for an SDR, 4K monitor which is probably the most common display type in use today. The diffusion parameter is most accurate in the range under 1.0 down to 0.5, depending on the ratio of phosphor dot to full mask.

The lower bound of usable diffusion is limited by two artifacts: aliasing (moiré) and gain. Aliasing is reduced with higher resolution, and gain can be increased with a higher dynamic range.

The average gain of both beam scanning and masking is calculated and used as makeup gain. In SDR mode, tone-mapping is used to bring levels down to acceptable SDR range. Even in SDR, tone-mapping can acceptably maintain brightness down to a diffusion value of at least 1.0.

The more relevant bottleneck to lowering diffusion right now is resolution. The default diffusion value of 2.0 was selected because it eliminates moiré at TVLs from 300 to 800 for 4K. The diffusion value can be lowered, but moirés can start to become apparent. These patterns are most apparent in a full white field.

Now that I have a better understanding, HDR will be fixed in the next update. There will be additional HDR enhancements in the upcoming weeks as I get more time to test it.

1 Like

Version 9 will be available in RetroArch shortly, and you can get it here:

In addition to the HDR fixes, the glow effect is much better optimized and my laptop with Intel Iris Xe integrated graphics can run the RF presets at full speed at 1080p. If you use the Vulkan driver, you can enable mipmapping in the parameter menu which can further improve performance.

5 Likes

The next update will have further bezel improvements: better performance and looks better too I think.

7 Likes

A new update will come tomorrow. There are further bezel optimizations, some bug fixes, and I have changed the default CAT to be linear Bradford because this is less harsh on blues (most visible in SDR). I also added an IPT alternative to gamut compression (instead of Luv). It’s actually less accurate, but keeps blue ‘blue’ instead of becoming purple on compression. It’s not the default because I think Luv still looks better, but I added it as an alternative for people who really don’t like blues skewing purple. Gamut compression only happens for SDR.

The bezel reflection color processing is also better aligned between SDR and HDR. They can’t look perfectly identical, but they should look closer to each other. Both use a unified color temperature shift, and for color compression (desaturation mimicking scattering of light), SDR uses Luv and HDR uses ICtCp. I was also doing the color processing per-sample before which was eating performance unnecessarily. The color processing now happens per-pixel.

Blue-noise dithering has been added to the final pass (16- to 10- or 8-bit). All noise generation functions in any shader will now make use of subframes if available as well.

1 Like

These shaders do seem really cool, but can we not get a set of the Consumer presets without Bezels/Rounded/Pre-applied scaling??

eg. “Flat Bezeless” ?

1 Like

Sort of. You can look at the hdtv presets and these are very close to flat, with a thin bezel. If you enable the bezel bypass, you can then adjust h-size and v-size to adjust the screen to your liking.

Because of the way the framing system works, you still need to use full aspect ratio instead of core-provided. This is to ensure the mask itself has the correct aspect ratio (e.g. 4:3).

Truly flat requires setting the deflection angle and curvature angles to 0.

Version 10 has a number of optimizations and includes presets optimized for Steam Deck. These can also be useful for low res devices.