With nostalgia running deep in the games industry today, many of you will remember playing games on old CRT screens with visible scanlines, or watching VHS tapes on those same screens, complete with fuzzy images and glitches. Today, we'll implement some of those effects in a post processing shader.
Nice crisp scanlines feels kind of wrong to me. Maybe I should try to do a variant with glow bleeding over from the neighbouring pixels?
EDIT: Is this view of scanlines an artifact of filming an interlaced CRT? Like, if you don't shoot 30fps you get the rolling artifact so you fix that. Then you might get a section that's twice as bright, so you adjust the shutter angle to 180 to hide it. But that "twice as bright" section was showing both interlaced passes, so in effect you end up filming only one pass of the interlacing. Actually filming both passes equally over the entire screen might be beyond the capabilities of your camera, which is why you stick with the 180 shutter angle. Which would create the appearance of there being horizontal gaps between pixels that you wouldn't have seen with the naked eye.
You can certainly make the scanlines less crisp - just use a scanline texture that includes a transition between light and dark rather than the hard transition I used. You could use any size texture as long as the wrap mode is set to Repeat. Or, you can set the filter mode of the smaller textures to Bilinear.
I don't have a real CRT to hand to test, but going off a bit of internet research and vague memories, these kinds of scanlines should (just about) be visible to the naked eye on a CRT, although I made the scanlines thicker and lighter in lieu of adding bloom. I considered adding bloom, but I wanted to keep the article on the shorter side - although a comprehensive article including a wider range of CRT and VHS effects would be interesting to write!
1
u/daniel_ilett Feb 12 '20
With nostalgia running deep in the games industry today, many of you will remember playing games on old CRT screens with visible scanlines, or watching VHS tapes on those same screens, complete with fuzzy images and glitches. Today, we'll implement some of those effects in a post processing shader.
https://danielilett.com/2020-02-12-tut3-7-vintage-video/
Thanks for reading! ❤