The one big riddle I still need to solve in this whole designing my own console thing is how I'm outputting the graphics, and as you might imagine, as I try to research this, I mostly keep running across forum posts and such from people trying to recreate the experience of playing their favorite old console games (or new games going for that sorta vibe) including the distinct differences between modern monitors and the CRTs they had back in the day. And a big part of that involves stumbling onto so damn many "scanline filters" that drive me up the wall.
If you zoom way the hell in on the above image, it is, to be fair, attempting to simulate a particular thing, but what it's simulating is not scan lines, and if the goal here is to look like a CRT, then essentially outlining every pixel with a black border, which is what this at least appears to be doing at a distance, is WILDLY wrong. If anything, color should be bleeding all over and filling any darker spaces.
I'd like to actually get into scan lines before getting into the other stuff that's wrong with this, but let me just hit you with another terrible example of what people call a "scanline filter" first just so we're on the same page.
For real here, what the hell are we even doing? The functional definition of what a "scanline filter" is seems to just be interlacing. That is to say, making every other row of pixels black. Now, this is at least a little bit tied to "retro graphics." I recall playing Day of the Tentacle back when it was new, and AT THE TIME, as the game itself had a maximum resolution of 320x200, and would be displayed on a monitor that even on the cheap end would be outputting at at least two or three times that, the graphics settings had an "interlaced mode" which rather than just displaying each pixel of the game's art as a 2x2 or 3x3 or 4x4 or whatever block of actual-monitor display pixels, it would only draw half of those, leaving alternating black lines that absolutely made it look like you were watching the whole game through some sort of mesh screen left half the visual information to your imagination, so you could just kinda pretend the resolution was higher and fill in the gaps between lines of pixels with your imagination.
But again, THAT HAS NOTHING TO DO WITH SCANLINES!
When you have a CRT, rather than having a big array of liquid crystal squares or heated plasma blocks or LEDs or whatever other weird thing people are using now that just have a direct current run through to turn them on and off, you have this absolutely bonkers mad science to-this-day-I-can't-believe-someone-even-thought-to-do-this-let-alone-it-being-plan-A gun just straight up firing out electrons in an accelerated stream that is aiming around at practically unfathomable speeds shooting at dots of phosphor painted onto a sheet causing them to glow with an intensity proportionate to how many electrons they're getting hit with. We don't have a separate gun for each dot, just the one hitting each in turn (well, 3 really, we have separate guns for the red green and blue dots). And specifically, because I suppose the alternative would be to encode the signal for every other line backwards to keep shooting on the return trip or something, what they would do is sweep (or if you prefer scan) across from left to right, light up one row of dots, swing back and drop down slightly, sweep across the next line, and so on, then on finishing the final line swing back up to the top left corner to start sweeping across energizing all the phosphor dots at the right intensity for the next frame of video. Or really if you want to get technical I believe they'd hit more like: every odd line on the first pass, reset, hit every even line, reset, new frame, repeat. I guess reading about that is where people get this interlacing idea from maybe?
Anyway, if you wanted to simulate this on a modern display, you'd just need to draw a new frame for every scan line in real time (ideally more since it's not like the line appears all at once, we're really hitting one dot at a time and going down the line). We literally can't do that though. We're probably simming a standard definition TV right? Well the standard differs depending where you are in the world, but the big two are the NTSC standard, which draws one frame composed of 480 lines 60 times a second, and the PAL standard of 576 lines 50 times a second. That's easy math to do. We just need a refresh rate of... 28,800 FPS. Or ideally more, because again, you'd want to draw each line over multiple frames... and that's just for a standard TV. If we're simming a monitor, there were CRTs out there that I THINK still managed 60 FPS while spitting out 1600 or so lines on each frame.
Unless I'm severely mistaken, modern display technology just straight up cannot get anywhere near that. It's rare to find a display that can go any higher than 60 and again, we're drawing a whole screen in that time so the lines aren't relevant there. I'm not even sure if the materials currently glowing/controlling how much light gets out can, on their own, flip on and off as a phosphor dot being pelted with electrons, but I DO know we're still setting pixel brightness one at a time, a line at a time, so what would there really even be to sim there? Hell, famously, filming CRTs never works right because most cameras' shutter speed won't catch things right, and if you use a super high speed camera you actually CAN see the scan lines being rendered one by one but you're catching so little light you're kind of only seeing the one line, as in this video here:
Now, displays back in the day, and also displays, you know, now, break out the red/green/blue components and just cram something close enough together to blend together and give you some single color with a ton of potential range. It's an illusion technically, much like the whole screen being lit at once and not just the last thing to get an update or getting hit with electrons. So let's get back to those black pixels in these filters and what they're actually trying to simulate and how dumb all that is. Have a couple more visual aids plucked from the above video.
Now you might be looking at this first image here and thinking "aha! Look! There totally are solid black lines between the pixels!" but that first one is the modern high res display. The second image is the one from a CRT. You will notice there is an offset, such that even with crazy high zoom there is no horizontal line you can draw through here that's ever going to be all black (unless that part of the screen is showing something black). Furthermore, again, it's important to keep in mind that while in that first image, every subpixel you're looking at is, in fact, glowing steadily over a period of time, at any given instant, only ONE of these little phosphor strips (of each color) is actually getting shot with electrons and doing its full-bright glow. When a given dot on the screen is active it is WAY brighter than what the camera here can detect and if you're really looking at one, your eyes are taking so long to process that you don't even notice that literally only the 3 are active at a time. Even this camera here is catching a bunch of fading afterimages. Point is, in real life, this display isn't anywhere near this dark.
So OK, let's say you're doing your CRT filter effect, which again, you should NOT be calling a "scanline filter" by all means make use of the higher resolution you have to work with and have like 5 redscale pixels, 5 black pixels, 5 greenscale pixels, 5 black, 3 bluescale, 5 black, then shift alternate columns down by 3, BUT if you're gonna do that, remember to have the brightness cranked way up on those bright ones, and also bring up the corresponding color values of the surrounding few pixels to properly portray that intense emissive glow. i.e. the "black pixels" between red and blue aren't really black they're some shade of purple or magenta or whatever, and hell ideally the color bleed shout cover at least one neighboring "pure color" column. Because nothing on a CRT has ever looked like you're looking at it through a screen door like all these filters floating around.
Oh and side not to everything, that offset hex grid-y shadowmask arrangement was I think the most popular for color CRT TVs but different people roll in different ways. Pretty sure this was more common for PCs with higher available resolutions, for instance:
For real though, you could light a whole room pretty well just having a TV on back when everyone had CRTs. I do not understand why all these filters make everything so much darker.
Also speaking of darkness, I'm sitting in it because I am completely bottomed out on money and I'm penny pinching every way I can so... patreon, maybe?
Just a few screenshots of some of the footage I shot in Iceland for @subpixelteam's new documentary, with a bit of touching up of course. Can't wait to get started on this beast of a doc! #Subpixel #Iceland #reykjavik #documentary #canon #c100 #sigma #landscape #film #filmmaking #premiere #editing #travel #cinemtography (at Reykjavík, Iceland) https://www.instagram.com/p/ByvIyAgHB25/?igshid=4sjuv8b5c3gb