Mix
Blends between two input images using a mix factor and an optional per-pixel mask.
Category: Composite Menu path: Composite > Mix
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
a | imageRgba16f | input | First image (shown when mix = 0) |
b | imageRgba16f | input | Second image (shown when mix = 1) |
mask | imageRgba16f | input | Optional mask image (luminance controls blend per-pixel) |
out | imageRgba16f | output | Blended result |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
mix | scalar | 1.0 | Blend factor between A and B. 0 = fully A, 1 = fully B. Keyframeable. |
invertMask | boolean | false | Invert the mask so dark areas show B instead of A. |
Expose Channels
When enabled (E button on node header), adds input ports that override params via edge connections:
| Port | Type | Overrides |
|---|---|---|
mix_in | scalar | mix |
How It Works
The shader performs a linear interpolation (mix) between images A and B. When no mask is connected, the mix parameter controls the blend uniformly across the entire image.
When a mask is connected, the shader computes the luminance of each mask pixel (Rec. 709 weights) and multiplies it by the mix factor to get the per-pixel blend amount. Bright mask areas show more of B, dark areas show more of A. The invertMask toggle flips this behavior.
The blending operates on all four channels (RGBA) simultaneously, so alpha is also interpolated between the two inputs.
Usage Examples
Basic: Crossfade between two images
- Connect image A and image B
- Keyframe
mixfrom 0 to 1 for a smooth crossfade transition
Creative: Masked effect application
- Connect your original image to A
- Connect a processed version (e.g., blurred, color-corrected) to B
- Connect a mask (gradient, shape, or painted matte) to the mask input
- The effect is applied only where the mask is bright
Advanced: Animated reveal with mask
- Connect a clean plate to A and a stylized version to B
- Use a Noise node's texture output as the mask
- Animate the Noise evolution to progressively reveal B through a dissolving pattern
Tips
- Mix defaults to 1.0 (showing B fully). Set to 0.5 for a 50/50 blend.
- The mask input uses luminance, so a grayscale mask works as expected. Color masks are converted to grayscale automatically.
invertMaskis useful when your mask is the opposite polarity of what you need, saving you from adding a separate Invert node.- Connect a Time node through Math to the
mix_inexpose channel for time-driven blending without keyframes. - Mix is different from Merge: Mix is a simple crossfade (A to B), while Merge is Porter-Duff compositing (foreground over background with alpha).