← Back to context

Comment by LocalH

7 months ago

One thing I see in this article is a very common blunder in dealing with images from these types of retro systems - non-integer vertical scaling. For accurate reproduction of these types of CRT raster images from an aspect ratio perspective, integer vertical scaling should always be done, followed by interpolated horizontal scaling to reach the correct aspect ratio.

Why? The original display method never blended across scanlines (except in the PAL world, where chroma only would blend across two otherwise discrete scanlines), but the analog nature of the scanning process provided a natural horizontal blending.

Some amount of vertical blending often occurred because scanlines tapered off in brightness, bleeding into the next scanline. For example, if the electron beam spot has a two dimensional gaussian profile, then the vertical profile of a scanline at a constant value will also be gaussian. If the height of the scanline (full width at half maximum of the gaussian) is around 1x the distance between scanline centers (a reasonable value at full brightness), then there will be significant overlap between neighboring scanlines. The point between the scanline centers will be a blend of them both.

How much blending there is depends on the brightness at that particular area (brighter parts of the image will have wider scanlines and more blending) and the characteristics and configuration of the particular TV.

If I wanted sharp pixels, I would use something like the pixel-art-scaling shaders in Retroarch. I like bandlimit-pixel and pixel-aa, but most of them look pretty similar. They basically try to antialias the pixel edges. I prefer to fill the screen as much as I can using the correct aspect ratio and not worry about integer scaling.

For more realistic blending, CRT shaders are pretty good now.

  • That depends on the size of the CRT. Signal-wise, there is never blending between scanlines (except for PAL chroma blending), only the natural blending of the image within each scanline as the voltage rises and lowers.