1 Blend Modes
Flaig edited this page 2026-10-07 20:53:54 +02:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Blend Modes

Several shaders take a blend number that decides how the effect is combined with the object's pixels. The numbers come from Token Magic FX and differ slightly between filters.

Standard modes

Used by electric, fire (blend and fireBlend), fumes, smoke, field, liquid, xray, images and splash:

blend Mode Effect
1 Multiply Darkens; white leaves the image unchanged.
2 Screen Lightens; black leaves the image unchanged.
3 Darken Keeps the darker of the two.
4 Lighten Keeps the lighter of the two.
5 Difference Absolute difference; strong color inversions.
6 Negation Similar to difference, softer.
7 Exclusion Low-contrast difference.
8 Overlay Contrast boost based on the image.
9 Hard light Contrast boost based on the effect.
10 Soft light Gentle version of hard light.
11 Color dodge Brightens strongly.
12 Color burn Darkens strongly.
13 Linear dodge (add) Adds the colors.
other Add Adds the colors.

Differences per filter

Filter Difference
field 13 adds at 60 % opacity; 14 draws the shield behind the object; 15 draws it over the object.
liquid, xray 13 is a glow-like mix; 14 and above add. xray treats 1 and below as multiply.
images, splash 14 is a high-contrast difference mix; other values add with clamping.
xfire Its own set, 1–14: 1 mix by brightness, 2–3 linear dodge/burn, 4–5 screen, 6 vivid light, 7 color dodge, 8 color burn, 9–11 combinations, 12 mix, 13 pure screen, 14 softer screen.

blendMode

outline, bevel and blur have blendMode instead: a PIXI blend mode for drawing the result. 0 normal, 1 add, 2 multiply, 3 screen.