The Scanline Classic Shader

cool, SECAM is next? :smiley:

There are no true SECAM consoles, but I would like to do it as a hypothetical. However the color carrier is FM modulated which is non-trivial compared to how NTSC and PAL color is implemented, so I’m not sure how accurate it will come out.

2 Likes

Attempt at RF … still a work in progress. I don’t know why the color is so dull, hopefully just a factor of 2 I need to add somewhere.

4 Likes

This is getting closer. The noise model is maybe too aggressive. Hard to say because I don’t have any actual reference to compare to. But I included a lot of parameters to tweak it.

3 Likes

In Composite and S-Video/RGB situations if you can easily see the noise and not just “feel” it, it’s probably too high.

2 Likes

The Neo Geo AES over composite. I was expecting it to look worse since Neo Geo is really meant for RGB. The AES is different from the other 16-bit consoles because it doesn’t derive its master clock from the subcarrier (or vice versa). Instead it has a completely separate master clock and subcarrier oscillator.

The result is a nice blend with no flicker, assuming my derivation’s accurate.

7 Likes

The SNES presets are now in the Libretro shader pack. I will be adding other systems over time, hopefully without needing to change any of the shader code at this point. Before I do that, I think I will make a few generic presets that will be stable for any input size, framerate, so they can be used with cores I haven’t made a preset for.

I am considering trimming the number of shaders in the shader pack down because there are a lot of variants for each system. I have already decided to limit consumer presets to one per system per region (usually composite). People could download the full pack themselves.

6 Likes

Be warned that online updater never delete files from user’s storage.

3 Likes

FYI I updated the bezel code which will now account for having a display aspect ratio other than 16:9. It will be in the next update which will be done on a weekly basis, probably Thursday or Friday.

For now RA scaling should be set to 16:9.

1 Like

I updated the OP as the old one was very out of date. I included information for all the parameters. The debug parameters are not official and may change at any time. I wanted to note some things about performance:

The RGB presets (usually the ones in the professional folder that don’t have any suffix, e.g. sfc.slangp) are the fastest performing. In order from fastest to slowest it goes RGB > S-Video > Composite > RF, with each step in performance being approximately exponential.

The bezel glow is a huge performance sink. If you set the Bypass glow setting (at the very bottom of the parameter list) to 0, you can get that performance back. The bezel itself can also be bypassed for further performance benefit as they are large textures.

2 Likes

I did try your snes preset but with PS1 game

seems good but the phosphor decay seems out of control :slight_smile:

I know that I need to play with the settings, but normal users usually dont, they may try the shader/preset and if they find that it has some artifacts they will mark it as “bad”

also, why it has to be a preset for 1080 and another for 2k etc…? is it hard to make the shader work in adaptive way with the screen resolution?

I also dont like the idea of having preset per console, but currently that has reasons, and I hope that the Libretro developers will find a solution in the future

The expectation I have for ‘normal’ users is to use a matching preset or ask me to make one for them which I will happily do as time allows. Getting the timing parameters right is highly technical, and there isn’t really any way to stop things from blowing up if the wrong values are set. If you load up the wrong preset I would actually hope it looks terrible so you know it’s wrong right away (I even considered making the screen magenta, or show warning colors when certain things go outside of the intended range, but for now haven’t done that).

The parameters are listed roughly in order of easiest to understand to most advanced/esoteric. But the reason for having parameters instead of putting the info into the shaders and selecting with some kind of lookup function is to at least allow someone who is familiar with the system but not familiar with shader programming to modify that aspect themselves (i.e. emu devs). The parameters are also very important for the development itself. I need to be able to see changes in real time for debugging.

The presets will work for other display resolutions, I test it on 1920x1200 as well. The current presets are optimized for 4K. There have to be separate presets for SDR, WCG, (HDR in the future) because they fundamentally work differently.

Even if we had all the uniforms, we would still need individual presets for RGB, S-Video, Composite, RF because people have different preferences for the signal format. These shaders are different than something like Blargg’s composite shader where the different options are just different mixes of the same noise model. In Scanline Classic, there are different pipelines for each signal type, and there are currently three different composite techniques because there were, in real life, different ways composite video was encoded.

When the generic presets drop this week, you will be able to compare and see how different the shader result is when the system timing is not set correctly.

4 Likes

well, I dont mind having more parameters, it’s on the contrary, I like to have many options, but I talk about a balanced default settings for the end user

it’s fine, but isn’t there are way for shaders to know if HDR being used? maybe it also need some uniforms variables?

that fine, but I prefer to have auto option in shader to select between S-Video, Composite, RF based on the console (like if the “cable” option set to auto and if it NES it will select RF internally and if it Genesis it will select Composite ETC…), and the same Logic can be used to select between CRT mask types

all of that above will be nice in case of generic preset which should make live easier for general users who are not deeply involved in technology, and also for those who want something that works with minimal intervention on their part

I dont mind having individual presets if there are a generic preset, also I like to have presets that represents specific CRT TV sets or CRT Monitors etc… and that will be nice for preservation too :slight_smile:

1 Like

Testing RGB mode with Intel Iris Xe Graphics on a laptop at 1920x1200, I can get close to full speed with the Vulkan driver (and the laptop isn’t plugged in) and reducing glow diffusion, glow radius. D3D12 performs a bit worse.

In composite mode, a mix of bezel and the composite processing becomes the bottleneck, turning off the bezel can get to 50 fps.

In RF mode, the RF processing becomes the bottleneck.

Will test how going on AC mode improves things.

2 Likes

With AC, I can get very close to full speed with the glowing bezel, but still about 10 fps short.

in that case maybe it worth adding a lite version of upcoming generic preset :smiley: for weak devices

@anikom15, I can’t get it to work. Any recommendations or prerequisites? Which directory should I extract this shader preset to?

Are you using the RetroArch downloader? Everything is in bezel: https://github.com/libretro/slang-shaders/tree/master/bezel

2 Likes

Update to 6.1.1 should come to Libretro distribution shortly.

4 Likes

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)