A great shader that seems to be forgotten: where did it come from?


#1

Hi there!

I have found myself using the shader included in Dinothawr (under the dinothawr/ subdir) called simply scanline.glsl, for years now. This shader looks GREAT without integer scaler, and scanlines are very faithful to what you see when you look at a CRT very near. AND it’s a very lightweight shader, suitable for Raspberry Pi (except for certain cores like Snes9x, where it seems to be too much for the memory bandwith of the machine, at least when using the VC4 core)

It seems to be an automatically generated shader, but do you guys know what’s it’s origin? Thanks!


#2

It’s in the regular packs, in the ‘misc’ directory. Themaister made it ages ago, and yeah, it’s one of the best for non-integer scales. In fact, crt-easymode uses the same basic technique to calculate its scanlines, which is why it looks so good at non-integer, as well.


#3

@hunterk: what other shaders can you recommend me that work great on non-integer scales, appart from crt-easymode?


#4

Scanline-sine-abs and (I think) zfast-crt. If your machine can handle anti-aliasing/shaders/ewa_curvature, it can scale up a lot of shaders to non-integer without a lot of aliasing issues.

This is misc/interlacing (notorious for looking like crap non-integer) running at 2x scale and then ewa-scaled up to 4.5x (1080p non-integer, scale: don’t care):

There’s curvature in that shot, but you can turn it off in the shader parameters.


#5

@hunterk: Since my machine is a Raspberry Pi3b+, there aren’t many shaders appropiate. But zfast is really great! Too bad SNES9x isn’t fullspeed with it anymore (I am on the VC4 driver, max_swapchain=2, so memory bandwith seems to be a problem with shaders + snes9x).

This was very educative, thank you!!