CRT Scanline shader for SNES Classic Mini?

Sadly thats still not working

Thanks, I’ll grab that. I found the Mali offline shader compiler too, which makes it easier to check if the shader compiles there once I’m doing things correctly and also counts instructions, which will be helpful once I find out just how slow the shader is on the snes classic. How did Nintendo manage to find something slower than a rpi3 though, that’s what I want to know!

1 Like

lol ikr? It’s shocking to me that you can even get anything that slow these days.

Sorry about that. The script that hunterk pointed me to should take care of the missing compatibility stuff. And then I’ll double check that it compiles on the Mali driver, and then I’ll upload something. It will probably be a couple of hours though.

Ok. I went over the shader conversion template from hunterk. Then I checked that the Mali driver compiles it with no errors (it does). If the shader still doesn’t run on the snes classic, I can try taking out the last option that is still set as a #define. If that doesn’t work either, then I’ll be out of ideas for the moment since the shader works fine with nvidia graphics on win10, intel graphics on linux, and on a rpi3.

I also changed most options to retroarch parameters, so if the shader works, you should be able to set most options from retroarch. So let me know!

Here it is:

Like the last test, this is just the glsl file. Not the preset, so you can’t load the shader with the “Load Shader Preset” option. Only by setting “Shader #0” to the shader file.

Ok the shader is now working :grinning:.

But changing the scaling to anything higher than x2 causes massive frame drops, having x5 is like 17fps and x4 24fps and obliviously leaving it on ‘dont care’ results in uneven scanlines.

Heres a video i posted…

The scanlines looked even with “don’t care”, as far as I could tell from that video.

There seem to be a band issue every couple of scanlines or so, if you look at the purple building…

Also The SNES Classic Mini has a rewind feature implemented kind of like retroarch’s im just wonder as this is enable at a system level is this using up extra resources thats cause performance issues with shaders when using Retroarch?

[quote=“BlockABoots, post:22, topic:12664, full:true”] There seem to be a band issue every couple of scanlines or so, if you look at the purple building…[/quote] The one setting you didn’t seem to try was Filter: Linear and Scale: Don’t care.

Like crt-pi, this shader needs linear filtering to work properly.

Ok ill give that a try, does integer scaling need to be enabled or disabled?

It doesn’t need to be enabled so try with both. Non-integer scaling is obviously better as it fills the screen vertically but it can be difficult to achieve - particularly with simple calculations.

Guess the SNES Classic has 720p in its favour then so running non interger scaling shouldnt be so much of an issue

Ok, I’m glad to see that it runs now!

Now that it is I’ll see what I can do about making it look a bit better at 720p. Thanks for making that video too BlockABoots, it’s really helpful. For non-integer scaling, I’ll adjust the scanline profile a little and that will help fix any uneven scalines.

For now: you should have it set to “Filter: Linear” and “Scale: Don’t Care” like davej says.

And then under Video, you probably want these settings (for now…):

Aspect Ratio: Custom

Custom Aspect Ratio Width: Somewhere between 896 and 960

Custom Aspect Ratio Height: whatever number says (3x) next to it. 720,717 or 672 depending on other settings

Integer Scaling: OFF (since we’re manually setting integer on the axis we we want)

Custom Aspect Ratio X pos. (Just center the image)

Custom Aspect Ratio Y pos. (Just center the image)

Then back under quick menu, shaders, you can start trying different parameters if you want.

Thanks for the info, ill try them out!

Ok just inputted the suggestions you made but im still getting uneven scanlines, odd thing is it just seems to be the bottom half of the screen the top half seems to be fine

If you look on the pillar of the red building the bottom half has uneven scanlines every other scanline or so yet the top half seems to be fine!..

It looks more prominent on my 42 LCD screen but you get the general idea from that screen shot

EDIT: Also if i change the Aspect ratio Height to 672 then you can see the difference from the bottom half of the screen compared to the top…

1 Like

Have you tried not using a custom aspect ratio and just using regular ol’ scale-to-fit with core-provided aspect?

Okay I have a few questions for you"

(1) Why are your images 2560x1440? Just because you’re viewing a video at your desktop resolution? What was the video captured with? And what resolution was the capture done?

(2) Is your TV 1080p? Because the snes classic outputs 720p only, so the scanlines will get applied to the 720p image and then upscaled to 1080p by your TV no matter what.

So it isn’t really possible to have “integer scaling” unless you plug an snes classic into a 4k tv (720 goes into 2160 evenly). And this means that there is probably no way to get perfect scanlines on a 1080p tv even with the integer scaling options of retroarch or writing the shader to only to integer scaling. We’re stuck with some scaling no matter what and that will mess with the scanlines to some extent.

But I’ll set my rpi to output 720p and try to get things as nice as possible this evening. I just spent a while making the shader do integer scaling before realizing that this won’t fix our issues at all because 1080p sets are the target.

1 Like

No i didnt, ill give that a go.


1.Yeah by desktop res is 1440p

2.I captured at 720p

3.My TV im viewing on is indeed 1080p.

Bit odd that is only appears to be displaying uneven scanlines on the bottom half of the screen though

Hi, after setting my rpi3 to output 720p I found that it’s pretty tough to come up with something that looks good all of the time. So I took a shot at writing a shader that scales the image up to the largest integer that fits in 720P (or whatever the native res is), centers the image there and then applies a more basic scanline effect. The advantage of this is that the 720P output just won’t have uneven scanlines. It can’t unless I just messed up. Which is possible because I had a heck of a time actually getting this to work properly.

Unfortunately it isn’t faster than the old shader. Which means we need to test the speed again. And good output depends on your TV doing decent scaling to 1080p. And unless the game resolution is a divisor of 720 then you’ll get an image that isn’t full height. But I think this is the best chance at something that looks generally good.

You can grab the shader and a preset file here:

The preset GLSLP goes in the parent folder and the GLSL goes in the shader subfolder (the normal case for retroarch shaders…).

Let me know if this works and especially if there is weird output (size/position of the game). And what the speed is. Sadly it could be slow…

This is what it’s supposed to do:

EDIT: and as soon as I looked at the post I realized that the image won’t be quite centered horizontally because I didn’t account for the aspect ratio of the game… oh well