Blend
Combine 2 images using different blend modes.
Node Data | |
|---|---|
Display name | |
Blend | |
Internal name | |
Node_Blend | |
Inheritances | |
| Node_Processor | |
| Node_Blend | |
Inputs | |
Node_Blend | |
surface |
Background |
surface |
Foreground |
surface |
Mask |
bool |
Invert Mask |
slider |
Mask Feather |
enum |
Output Dimension |
vec2 |
Constant Dimension |
enum |
Blend Mode |
slider |
Opacity |
bool |
Preserve Alpha |
enum |
Fill Mode |
vec2 |
Position |
enum |
Horizontal Align |
enum |
Vertical Align |
Outputs | |
Node_Blend | |
surface |
Surface Out |
Attributes | |
| Color Depth | |
Blending surfaces is a fundamental step in any VFX process. Blend node allows you to combine 2 surfaces under different blend equation.
Blend Mode" class="anchor">Blend Mode
Blend Mode control how the surfaces are being mixed. The table below shows the underlying equation and an example blending result of these 2 surfaces:

| Mode | Operation | Example |
|---|---|---|
| Normal | $$C_{out} = C_{fg}C_{fg.a} + C_{bg}(1-C_{fg.a})$$ | ![]() |
| Add | $$C_{out} = C_{fg} + C_{bg}$$ | ![]() |
| Subtract | $$C_{out} = C_{fg} - C_{bg}$$ | ![]() |
| Multiply | $$C_{out} = C_{fg}C_{bg}$$ | ![]() |
| Screen | $$C_{out} = 1 - (1-C_{fg})(1-C_{bg})$$ | ![]() |
| Overlay | $$C_{out} = \begin {cases} 2C_{fg}C_{bg} & C_{fg} < 0.5 \\ 1 - 2(1-C_{fg})(1-C_{bg}) & C_{fg} \ge 0.5 \end {cases}$$ | ![]() |
| Hue | Transfer the hue of the foreground to the background | ![]() |
| Saturation | Transfer the saturation of the foreground to the background | ![]() |
| Luminosity | Transfer the luminosity of the foreground to the background | ![]() |
| Maximum | $$C_{out} = max(C_{fg}, C_{bg})$$ | ![]() |
| Minimum | $$C_{out} = min(C_{fg}, C_{bg})$$ | ![]() |
| Replace | $$C_{out} = C_{fg}$$ | ![]() |
| Difference | $$C_{out} = |C_{fg} - C_{bg}|$$ | ![]() |
Opacity
The intensity of the effect will be multiply by the Opacity property.
Preserve Alpha
Blend operation apply to all channel including alpha channel. Which mean some operation may erase the alpha channel of the original image. To exclude the alpha calculation, set Preserve Alpha to true.
Dimension Mixing
When blending surfaces of different sizes. You can set the blending behaviour using several properties:
Fill Mode
The Fill Mode property control the behaviour of the smaller surface.
| Mode | Description |
|---|---|
| None | Do nothing, place smaller surface directly. |
| Stretch | Stretch the smaller surface to fit the larger surface. |
| Tile | Tile the smaller surface to fit the larger surface. |
Position
When Fill Mode is set to None, you can set the position of the Foreground freely using the Position property.
Related Links
- Base Code: /scripts/node_blend/node_blend.gml












