UPDATE 2024-04-20: Version 5.0 now available
This is official support thread for my Scanline Classic shader. You can find the latest version with instructions here: https://github.com/anikom15/scanline-classic
Right now only slang is supported, but I plan to port a GLSL version for standalone emulators and a BGFX version for MAME. There is also only one preset. I plan to make presets for a variety of systems and use cases.
Features:
-
Color correction and transformations: the shader supports three color mode. The first two are monochrome modes. You can specify either one or two color primaries which determine the tone of grayscale. This can be used to simulate a variety of monochrome monitors. The third is the color mode. Any three-primary color space can be simulated by providing the appropriate chromaticity values and weights. If you need help determining the values for a particular look, feel free to ask for help.
-
Wide gamut support: particularly useful for monochrome modes, the colors are calculated according to the gamut supported by your display. sRGB, DCI, Adobe RGB, and BT.2020 are supported.
-
Phosphor decay simulation: the shader simulates phosphor decay in XYZ space, which has the advantage of allowing some very cool effects when used with the two-primary monochrome mode. Other shaders do their decay in RGB space, so these effects wouldn’t be possible.
-
Scanline and interlacing simulation: Flexible scanlines can be added. The scanlines are always solid, but the ratio of active scanline width to blank scanline width can be adjusted. Line-doubling can also be simulated by setting ON_PIXELS to 2 and OFF_PIXELS to 0. Interlacing can be supported by setting an appropriate HI_RES_THRES value and this allows for automatic progressive and interlaced mode switching for systems like the PlayStation.
-
Mult-scan support: The shader can cope with systems that have variable resolutions, like Macintosh and Windows 98.
-
Geometry simulation: There are settings for pincushioning and barreling the image. Various tweaks are possible to get a variety of effects. These effects account for the display aspect ratio, something many shaders don’t account for. The overall output can be scaled to a desired picture fill.
-
Shadow mask simulation: Several of the usual shadow mask patterns are available.
Here are some live images showing support for different color spaces:
Here are screenshots showing what this shader can do: