Looking for ragged or jagged scanlines

I’m looking for a shader that is light on resources and can create the following effect. I’ve been doing this with overlays for years but in recent times it seems to be causing the game screen colors to wash out. Here’s the pattern when you zoom in on it: image

Thanks for any help!

2 Likes

The Sony Megatron or (I believe) Guest Advance will do that - look at vertical convergence and min max scanline length in the shader params. It should allow you to get this kind of thing. EDIT: Assuming the white is the scanline i.e the coloured bit. The 1 pixel alternate horiz offset in the alternating scanlines not sure I know of any shader that does that though - does a CRT youve actually seen do that? You could try a ‘slot mask’ that may give you that effect.

2 Likes

Actually the black lines are supposed to be the scanlines and the white is whatever is behind them. Here’s a Rygar screenshot from the web that I layed my scanline pattern over:

Make sure you view that at the full size (1440x1080) or it will not look right.

I had nothing but CRT tvs until 2015 when I got my first flat-screen, HD tv. Honestly, I’ve never seen any effect that does it exactly right. I think that probably impossible. I’ve seen some that get pretty darn close but have expensive CPU/GPU costs which translates to expensive performance costs on the low-powered devices I usually use for emulation.

I still have two CRTs. One is a 27" Philips and the other is 13" Emerson. Hard to see anything on the 13" as it’s so small that even the scanlines created by my real NES disappear. I can still see something like a dot pattern though. On the 27" and the way I remember all other CRTs I had in my life (20" to 32" of various brands) I see a pattern of very thin broken vertical black lines when I get up close when watching video or using anything other than the NES. When I use the NES, I see that and the NES’s horizontal lines.

So this pattern that I’ve come up with over the years is the closest I’ve seen to a real NES on a real CRT…on a processing budget. From a healthy playing distance, it looks perfect to me, as far pattern goes.

Honestly, I think I could get by with a dotmask and normal scanline layed on top of it but whenever I try to use both of those shaders at the same time, they mess each other up.

I will try the shader/settings you suggested. Even if the pattern it creates is the white lines of my pattern, that’s still pretty close. Thanks for the suggestion.

5 Likes

Interesting. For some reason I like this look a lot, would love to see it in action.

3 Likes

you could try using the blendoverlay shader in the ‘reshade’ subdirectory of the slang shaders. You’ll need to modify the preset to point to your overlay pattern.

3 Likes

Thanks for the interest. I should’ve mentioned before that the scanline effect of the pattern is not very strong when the screen isn’t scrolling left or right. It get’s stronger when the screen is scrolling left or right. When the screen scrolls up or down, the pattern creates a vertical scanline effect.

The pattern above has evolved over the years. I used to use a different pattern for arcade games. I still do sometimes. I’m kinda on the fence about it. This pattern creates a mask effect that I think more closely resembles CRT computer monitors: image

Here’s the pattern overlayed on a screenshot of an arcade game:

Really just different dotmask there but it looks the way I remember arcade monitors looking back in the day when they were new and didn’t have a lot of flicker yet.

2 Likes

Thanks for that suggestion! Would I need to have a premade 1920x1080 image tiled with my pattern? Or would I just be able to point it to small image containing the pattern (a tile) and it would tile it across the screen for me?

should just need a tile. You can check out the example textures to see how they look.

1 Like

No problem and I’ll be keeping an eye on this thread, I’ve never seen masks like those so I’m intrigued. Hopefully whenever you finish touching up your shader you can post up a preset to try out.

Hi @eagle-fang great work on the pattern it looks like you’re trying to create a screen with a slot mask pattern? If that’s right then you can probably do that on a low powered device with the Sony Megatron as it’s quite light weight (I could probably strip it down to its bares bones if it’s not). As a example of what you can get with the Sony Megatron in SDR mode I’ve mocked it up - whether it’s any worse or better than what you have is arguable of course. Let me know what you think and what device you’re running it on (Pi4?) At the very least it’s another option for you from the pattern above.

3 Likes

Thanks for the suggestion. Yeah, that looks pretty close. I will give it a shot. I did play with a pattern very much like that when I first started making these overlays. The pattern has evolved a lot. The current pattern was made about a year ago when I was trying to combine what you call a slot mask with scanlines.

I mostly use androidtv boxes and fireTvs with retroarch installed. I do have a couple of Pi3bs though. One is collecting dust in a drawer. The other is in my converted Arcade1UP cabinet running RetroPie. Oh wait. I also have an original Pi1 running RetroPie but I don’t play games on it. It’s real purpose is a cheap, lazy man’s NAS.

Thanks again for the suggestion! I will play around with Sony’s Megatron until I get it Optimus Prime! hahaha

2 Likes

I didn’t find anything in the slang folder but I did find this in the glsl? folder. It very much solves my problem. I was using my original 1920x1080 overlay with blendoverlay and it compensated for the washed-out colors with a lot of tweaking.

The weird thing is that my overlays don’t cause the colors to wash out on my PC. It seems to just happen on my androidtv boxes.

1 Like

Thanks to everyone for their suggestions. I couldn’t get really get anything to make something close to my pattern but while I was trying different shaders I noticed that using ANY shader restored the color that was being lost when using my overlay.

So, I’m using the glow shader with settings of 0.90 and 1.5 with my overlay…and it looks awesome to me. Really close to my 27" crt.

Also, while playing with these settings, I realized that the overlay/pattern I was posting here was not the actual overlay/pattern I wanted to use (it was a previous version). Here is the integer-scale version: (I can post the non-integer-scale if anyone is interested)

Here’s a close-up of the pattern: image

Basically same as originally posted here but instead of skipping one line of pixels between lines, it skips 2.

Thanks again to everyone for their help.

3 Likes

Oh, I also set the opacity of my overlays to 0.48