Scanlines: A Guide
Note: here “scanline” is used to refer to the black gaps between lines.
This guide will provide step-by-step instructions for making scanlines either as thick as possible or as thin as possible for the display being used. Of course, most people will prefer something in the middle, but understanding how to get min/max thickness will make it easier for the user to obtain the desired results.
This guide refers to settings used by the guest-dr-venom shader, but it can be applied to other shaders. The names of the settings might differ but the basic concepts are the same. Dogway’s grading shader is required; scoll to the end of this post for links to everything you’ll need. All the test patterns referred to here can be found in Fudoh’s 240p Test Suite (link at the bottom).
A calibrated display is required to get the best results. If the display has a backlight setting, it is recommended that this be adjusted to 100% before adjusting the scanlines.
If you’re particular about how the scanlines look, then start by defining the scanlines before moving on to any color-related work. If you’re seeking to maximize dynamic range, then save the scanlines for last. See section on “dynamic scanlines.”
For best results, integer scaling and 5x or higher vertical scale is recommended. Scroll to the end of the post for additional info and tips to improve image quality.
Feedback and suggestions are welcome
Minimum TVL/scanline thickness
Start with the following settings. Anything not listed should be left at the default setting.
horizontal glow grade: 0
vertical glow grade: 0
raster bloom %: 0
bright boost dark pixels: 1.00
bright boost bright pixels: 1.00
scanline type: 2.00
beam shape low: 15.00
beam shape high: 23.00
scanline dark: 1.00
scanline bright: 1.00
increased bright scanline beam: 0.00
curvaturex: 0.00
curvaturey: 0.00
glow strength: 0.00
CRT mask: -1.00
bloom strength: 0.00
scanline saturation: 1.00
- display the “color bars” test pattern
- gradually lower “beam shape high” until the scanlines over the “F” column disappear over one or more colors. Then raise beam shape high by 1.00.
- lower “scanline bright” by 0.05 and then lower “scanline dark” by 0.05. Continue lowering them gradually, alternating between the two, until any scanlines over the “F” column disappear. Then raise the lower of the two values by 0.05. The scanlines under the F column should now all be visible.
- If you want the scanlines to be darker, follow the process in reverse. Gradually raise “scanline bright” and “scanline dark” until the scanlines are as dark as desired.
Maximum TVL/scanline thickness
Start with the following settings. Anything not listed should be left at the default setting.
horizontal glow grade: 0
vertical glow grade: 0
raster bloom %: 0
bright boost dark pixels: 1.00
bright boost bright pixels: 1.00
scanline type: 2.00
beam shape low: 15.00
beam shape high: 23.00
scanline dark: 1.00
scanline bright: 1.00
increased bright scanline beam: 0.00
curvaturex: 0.00
curvaturey: 0.00
glow strength: 0.00
CRT mask: -1.00
bloom strength: 0.00
scanline saturation: 1.00
- display white screen test pattern
- gradually increase “scanline dark” and “scanline bright” by 0.05 at a time, alternating between the two. Measure the light output of the screen with a light meter or smartphone app with each adjustment made until the light output falls below the desired target.
- reduce the higher of the two values by 0.05. The scanlines should now be as dark as possible while still maintaining adequate brightness. You can also eyeball this- you just want white to be really white. If using a light meter, 100 - 120 nits is a good target.
- check “color bars” test pattern for any artifacts. If there are any artifacts, gradually lower “scanline bright” and “scanline dark” until there are no artifacts present. (Scanline patterns can cause artifacts with some displays with some configurations)
- If you want the scanlines to be lighter, follow the process in reverse. Gradually lower “scanline bright” and “scanline dark” until the scanlines are as dark as desired.
Dynamic Scanlines
These settings will maximize the beam width variance and dynamic range in the image. Do this if you want the best possible objective picture quality. These are the settings I use for all systems.
horizontal glow grade: 0
vertical glow grade: 0
raster bloom %: 0
bright boost dark pixels: 1.00
bright boost bright pixels: 1.00
scanline type: 2.00
beam shape low: 15.00
beam shape high: 5.00
scanline dark: 1.30
scanline bright: 0.70
increased bright scanline beam: 0.00
curvaturex: 0.00
curvaturey: 0.00
glow strength: 0.02
CRT mask: -1.00
bloom strength: 0.00
scanline saturation: 1.00
You don’t need to do anything else to these settings, but you might be able to expand the dynamic range a little bit further by raising the scanline dark parameter a bit and/or lowing the scanline bright parameter a bit. Display color bars when making any adjustments to ensure that there’s no clipping or crushed blacks and no eye strain when attempting to distinguish any of the color bars.
Helpful links