Blend

Combines two textures with a blend mode, like layer modes in an image editor.

Outputs

NameTypeDescription
OutputTextureThe blended result.

Inputs

NameTypeDescription
ForegroundTextureThe top layer. With nothing connected it counts as empty.
BackgroundTextureThe bottom layer, stretched over the whole output. With nothing connected it counts as empty.
MaskTextureWhere the blend applies, from black for the plain background to white for the full blend, stretched over the whole output. With nothing connected the blend applies everywhere.

Parameters

NameTypeDescription
SizeEnumWhere the size of the output comes from. Background and Foreground take it from that input, Custom from Resolution.Choices: Background, Foreground, Custom
ResolutionVector 2 IntThe width and height of the output in pixels. Only present when Size is Custom.
Blend ModeEnumHow the foreground is combined with the background.Choices: Over, Darken, Multiply, Color Burn, Lighten, Screen, Color Dodge, Add, Overlay, Soft Light, Hard Light, Difference, Exclusion, Subtract, Divide, Average
Foreground ScalingEnumHow a foreground of another size is fitted to the output. None keeps it at its own size in the middle, Fit shows all of it and Fill covers the output.Choices: None, Fit, Fill, Stretch
Blend AlphaadvancedBoolWhether the blend mode also applies to the alpha channel. When off, alpha is combined as in Over.
FilteradvancedEnumHow a scaled input is read between its pixels. Nearest keeps hard pixels, and Linear Nice keeps edges next to transparency clean.Choices: Nearest, Linear Fast, Linear Nice
Mask ChanneladvancedSwizzleWhich channel of the mask is read. Pick A to mask with the shape of a cut-out picture.
Mask FilteradvancedEnumHow the mask is read between its pixels when it has another size than the output. Nearest keeps hard pixels, and both Linear choices blend them.Choices: Nearest, Linear Fast, Linear Nice
FormatadvancedEnumThe pixel format of the output. Auto is wide enough for both inputs.

The Blend operator puts one texture over another, the way layer modes do in an image editor. Use it to lay a logo or a title over a picture, or to combine two pictures into one.

In Over mode, the foreground covers the background as far as its alpha lets it. Every other mode combines the two colors channel by channel: Multiply darkens, Screen and Add lighten, and Difference shows where the two differ.

The output takes its size from the background, so a small Color as the background gives a small output. Give the Color the resolution of the picture, or set Size to Foreground.

See also Mixer, Resize.

Keywords: composite, layer, over, multiply, screen, add, overlay, mask, mix