It's possible to have almost non-integer scaling look as sharp as a CRT ever did, people are just too lazy to do it right. The reality is that you only have to do integer scaling on the vertical axis and you can do very non-integer on the horizontal to maintain original aspect ratio and still have it look perfect.
This image has integer scaling on the vertical but imitates PAL pixel aspect with a very non-integer (and not even close to integer) scale.
Same thing with scanlines, it's just laziness darkening every other line or something to that effect. In truth you want an overlay filter at about 50% blend to effectively copy scanlines. If you're curious, that makes a "hysteresis" curve that ensures that the average of two lines, one dark and one light average to a 1:1 with the source.
So no stupid darkening. Perfect aspect ratio and looks just as sharp. But like I said, too lazy to implement it.
With these two powers combined we even get a pseudo soft bloom that was characteristic of CRTs for free. No pixel shaders required, simple horizontal linear filter and simple vertical scaling with a super basic overlay function.
I worked out the other day what that function was and came up with:
Code: Select all
static inline uint8_t scanline_filter(uint8_t component, bool is_light) {
uint8_t min = (component < 127) ? 127 : component;
uint8_t cd2 = (component >> 1);
return cd2 + (is_light) ? min : (component - min);
}
Note that I've not tested this as I to am lazy. And also swamped with Buffee. It would be super keen if someone out there gave this a try.