Skip to content

Merge

Composites a foreground image over a background using Porter-Duff alpha compositing with blend modes.

Category: Composite Menu path: Composite > Merge

Ports

PortTypeDirectionDescription
fgimageRgba16finputForeground image (composited on top)
bgimageRgba16finputBackground image (composited behind)
outimageRgba16foutputComposited result

Parameters

ParamTypeDefaultDescription
blendModeenumNormalBlend mode for compositing. Options: Normal, Add, Multiply, Screen, Overlay. Keyframeable.
opacityscalar1.0Foreground opacity (0 = fully transparent, 1 = fully opaque). Keyframeable.

How It Works

The shader applies the selected blend function to the foreground and background colors, then composites the result using the Porter-Duff "over" operator with premultiplied alpha.

Blend Modes

  • Normal -- foreground replaces background where it has alpha
  • Add -- foreground + background (brightens, good for light effects)
  • Multiply -- foreground x background (darkens, good for shadows and texture overlay)
  • Screen -- inverse of multiply: fg + bg - fg x bg (lightens, good for glows)
  • Overlay -- multiply where background is dark, screen where background is bright (contrast enhancement)

The opacity parameter scales the foreground's alpha before blending, so reducing opacity fades the foreground contribution.

Usage Examples

Basic: Layer two images

  1. Connect the top image to fg and the bottom image to bg
  2. Leave blend mode on Normal and adjust opacity
  3. This is the same operation the timeline does when compositing layers, but within a single layer's node graph

Creative: Light effects with Add

  1. Connect a glow or particle render to fg
  2. Connect the scene to bg
  3. Set blend mode to Add for additive light blending where bright areas stack

Advanced: Texture overlay

  1. Connect a texture or grunge image to fg
  2. Connect your main image to bg
  3. Set blend mode to Multiply and reduce opacity to 0.3-0.5 for a subtle darkening texture overlay
  4. Try Overlay instead for texture that affects both highlights and shadows

Tips

  • Merge is the same compositing operation the engine uses for layer compositing in the timeline. Use it within a node graph when you need to combine textures at an intermediate stage.
  • The Output node provides blend mode and opacity for final layer compositing. You only need Merge for in-graph compositing.
  • Add mode can push values above 1.0 in the linear working space, which is useful for HDR-style effects.
  • When only fg is connected (no bg), the result is the foreground with opacity applied.
  • Mix -- crossfade between two images with an optional mask
  • Matte -- cut out regions using alpha/luminance masks
  • Blur -- soften before merging for glow effects

Caddis — professional motion design.