Scanlines and highlight protection
Posted: Tue Jun 23, 2020 3:30 am
After staring at CPS1 games for a while, I felt like something was a bit "off" when using the "Scanlines (Sharp)" filter. (And I was not much of a fan of "Scanlines (Soft)".) I was not sure if it was sharpening, or something else. I started to focus in on some of the character models, especially the brighter colors, and noticed what appears to be loss of detail in "highlights".
Looking at the "Scanlines (Sharp)", I noticed values were exceding the "128" maximum in the comments [of other filters] for some values in the vertical coefficients.
I ended up pasting the values in Excel, and charting them against Normal_Scanlines_030 [appears to be the equivalent without "brightness" applied]. I manually adjusted values in the upper regions of the curve and came up with values that do not have this loss of detail, at the expense of increased brightness for "bright" colors.
Only thing I am not sure of, if there is a formula that could produce smoother color transitions, or if just hand editing the curve is good enough.
Attached are images created using the PolyphasePreviewer tool [1], comparing the modified filter with the original "Scanlines (Sharp)".
(I also made a second filter with slightly higher values, but still not exceding the "128" maximum. The difference on my screen is very slight.)
Disclaimer: I grabbed the screenshots to use with PolyphasePreviewer from emuparadise.
[1] https://github.com/rikard-softgear/PolyphasePreviewer
Color ramps (modified vs original) - (e.g., the brighter colors)
SF2 (modified vs original) - (e.g., the roof)
SF2 (modified vs original) - (e.g., E. Honda's skin tone)
Looking at the "Scanlines (Sharp)", I noticed values were exceding the "128" maximum in the comments [of other filters] for some values in the vertical coefficients.
I ended up pasting the values in Excel, and charting them against Normal_Scanlines_030 [appears to be the equivalent without "brightness" applied]. I manually adjusted values in the upper regions of the curve and came up with values that do not have this loss of detail, at the expense of increased brightness for "bright" colors.
Only thing I am not sure of, if there is a formula that could produce smoother color transitions, or if just hand editing the curve is good enough.
Attached are images created using the PolyphasePreviewer tool [1], comparing the modified filter with the original "Scanlines (Sharp)".
(I also made a second filter with slightly higher values, but still not exceding the "128" maximum. The difference on my screen is very slight.)
Disclaimer: I grabbed the screenshots to use with PolyphasePreviewer from emuparadise.
[1] https://github.com/rikard-softgear/PolyphasePreviewer
Code: Select all
# Scanlines (Sharp Mod).txt
# Horizontal Coefficients
0, 128, 0, 0
0, 128, 0, 0
0, 128, 0, 0
0, 127, 1, 0
0, 126, 2, 0
0, 122, 6, 0
0, 113, 15, 0
0, 94, 34, 0
0, 64, 64, 0
0, 34, 94, 0
0, 15, 113, 0
0, 6, 122, 0
0, 2, 126, 0
0, 1, 127, 0
0, 0, 128, 0
0, 0, 128, 0
# Vertical Coefficients
0, 128, 0, 0
0, 127, 1, 0
0, 124, 2, 0
0, 120, 4, 0
0, 112, 7, 0
0, 102, 13, 0
0, 88, 23, 0
0, 72, 36, 0
0, 54, 54, 0
0, 36, 72, 0
0, 23, 88, 0
0, 13, 102, 0
0, 7, 112, 0
0, 4, 120, 0
0, 2, 124, 0
0, 1, 127, 0
Code: Select all
# Scanlines (Sharp Mod 2).txt
# Horizontal Coefficients
0, 128, 0, 0
0, 128, 0, 0
0, 128, 0, 0
0, 127, 1, 0
0, 126, 2, 0
0, 122, 6, 0
0, 113, 15, 0
0, 94, 34, 0
0, 64, 64, 0
0, 34, 94, 0
0, 15, 113, 0
0, 6, 122, 0
0, 2, 126, 0
0, 1, 127, 0
0, 0, 128, 0
0, 0, 128, 0
# Vertical Coefficients
0, 128, 0, 0
0, 127, 1, 0
0, 126, 2, 0
0, 123, 4, 0
0, 116, 7, 0
0, 105, 13, 0
0, 90, 23, 0
0, 72, 36, 0
0, 54, 54, 0
0, 36, 72, 0
0, 23, 90, 0
0, 13, 105, 0
0, 7, 116, 0
0, 4, 123, 0
0, 2, 126, 0
0, 1, 127, 0
Color ramps (modified vs original) - (e.g., the brighter colors)
SF2 (modified vs original) - (e.g., the roof)
SF2 (modified vs original) - (e.g., E. Honda's skin tone)