Posted August 21, 2022 by megamarc
Proper CRT emulation in pixel-art games designed to look like old games cannot ignore CRT emulation. Their graphics were designed to be displayed on a CRT device, with all their quirks and characteristics. Developers knew how to take advantage of their properties, so displaying them with perfectly sharp, square pixels is simply wrong. That's why attaching a retro system to an actual CRT looks much better than running an emulator on a modern LCD panel.
From the beginning, Tilengine has aimed to faithfully reproduce old-school graphics using the same techniques used in actual retro systems. That's why there's a built-in CRT effect in the windowing system. Although it has served its purpose, it has some flaws. Look at this 4x side by side upscale:
The effect emulates a slot mask RGB triad but has the following problems:
The new implementation tries to address these defects, while running on low-end graphics hardware, as it doesn't require pixel shaders
4x preview upscale for comparison:
One effect that was always present in the original implementation and has been set as optional in the new implementation, is RF blur.
This effect is needed for genesis/megadrive-like graphis. This system has a resolution of 320px horizontally, considerably higher than the standard 256px of that era, but it has a limited coluor palette and lacks blending (transparency) compared to its rival main, the SNES. Due to RF modulation used to transmit the signal, adjacent horizontal pixels get mixed together, outputting a colour that is a blend of both. This quirk was exploited by game developers, that used to create vertical strips of interleaved colours, or layer coverage, to simulate more colours and blending.
Now this behaviour can be optionally activated. Missing it whet it's needed it's not correct, but always forcing it isn't correct either.
Look at how the vertical colour strips in the original image blend together creating intermediate colours non existent in the source image.
There are many good CRT filters out there that take actual CRT physics in consideration, like beam width, dot pitch, curvature, etc. They look good but are generally quite GPU intensive and not suited for low-end hardware.
Tilengine tries to produce a good enough look and feel, approximating the end result without emulating the underlying physics while keeping good performance.
This feature will be included in the upcoming release