Blend
Combines two textures with a blend mode, like layer modes in an image editor.
Outputs
| Name | Type | Description |
|---|---|---|
| Output | Texture | The blended result. |
Inputs
| Name | Type | Description |
|---|---|---|
| Foreground | Texture | The top layer. With nothing connected it counts as empty. |
| Background | Texture | The bottom layer, stretched over the whole output. With nothing connected it counts as empty. |
| Mask | Texture | Where 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
| Name | Type | Description |
|---|---|---|
| Size | Enum | Where the size of the output comes from. Background and Foreground take it from that input, Custom from Resolution.Choices: Background, Foreground, Custom |
| Resolution | Vector 2 Int | The width and height of the output in pixels. Only present when Size is Custom. |
| Blend Mode | Enum | How 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 Scaling | Enum | How 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 Alphaadvanced | Bool | Whether the blend mode also applies to the alpha channel. When off, alpha is combined as in Over. |
| Filteradvanced | Enum | How 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 Channeladvanced | Swizzle | Which channel of the mask is read. Pick A to mask with the shape of a cut-out picture. |
| Mask Filteradvanced | Enum | How 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 |
| Formatadvanced | Enum | The 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.
Keywords: composite, layer, over, multiply, screen, add, overlay, mask, mix