2
Shader Greenscreen Key
Aiden edited this page 2026-05-08 19:03:26 +10:00

Greenscreen Key

Field Value
Shader ID greenscreen-key
Category Keying
Package shaders/greenscreen-key/
Passes rawMatte, refinedMatte, final

Greenscreen Key is a production-style green/blue screen keyer with matte refinement, despill, edge treatment, crop controls, and debug views. It outputs premultiplied-looking color and alpha for compositing/keying.

Controls

Control Type Default What It Does
Screen Color color Green Target key color.
Threshold float 0.24 Base distance from key color.
Softness float 0.16 Matte feather around the threshold.
Screen Balance float 0.5 Balances key response around the selected screen color.
Screen Pre Blur float 1 Blurs source before matte generation.
Erode/Dilate float 0 Shrinks or expands the matte.
Matte Blur float 1.25 Smooths the refined matte.
Matte Gamma float 1 Shapes matte falloff.
Matte Contrast float 1 Increases or reduces matte separation.
Black Cleanup float 0 Cleans low-alpha areas.
White Cleanup float 0 Cleans high-alpha areas.
Despill float 0.45 Reduces screen-color contamination.
Despill Bias float 0 Biases despill behavior.
Spill Tint color White Tint used during spill correction.
Edge Recover float 0.18 Restores edge detail/color.
Edge Color color White Edge recovery tint.
Clip Black float 0 Cuts low alpha values.
Clip White float 1 Pushes high alpha values to full opacity.
Crop Left/Right/Top/Bottom float 0 Crops unwanted screen edges before final output.
View Mode enum Composite Composite and debug views for matte/key inspection.

Tips

  • Start with Screen Color, Threshold, and Softness.
  • Use View Mode to inspect matte problems before adjusting final composite controls.
  • Use Erode/Dilate, Matte Blur, and cleanup controls after the basic key is close.
  • Use crop controls to remove stands, edges, or off-screen junk without adding another layer.