Mix Mode Types

 
 
 

Mixer shaders are an alternative texture blending tool to a shader's built-in support for texture layers. Like texture layers, they allow you to blend textures together, one after the other. Unlike texture layers, which are blended with a shader's parameters, mixer shaders are used to drive shader parameters directly, using the result of the mix.

Mixer shaders also lack the flexibility of texture layers. For example, while you can move texture layers up and down in the mixing order with a single command, the only way to change a mixer shader's mix order is by changing all of its shader connections.

For more information about working with texture layers, see Blending Textures with Texture Layers.

The Mode parameter of the Mix 2 Colors and Mix 8 Colors shaders determines how the images are mixed. The following images show how each mixing mode combines background and foreground layers.

Background

The background layer image used in the examples below.

Foreground

The foreground layer image used in the examples below.

Alpha

The Weight multiplied by the foreground's alpha is used to create a hole in the background, which is filled by the foreground color multiplied by the foreground alpha multiplied by the weight.

Decal

It uses the Weight to create a hole in the background, which gets filled by the foreground multiplied by the weight.

You can create a decal effect by using an image to drive the Weight. Alternatively, to use the foreground's alpha, set the Weight to 1.0 and activate Multiply Weight by Alpha.

RGB Modulate

The same as Hide/Reveal (Multiply).

Mix

Calculates the weighted average of the background and foreground based on Weight.

Tip: Scrub the Weight slider for a cross-fade.

RGB Intensity

Calculates a proportional average of each layer's pixel values. The average is dependent on the brightness of each layer.

Hide/Reveal (Multiply)

Multiplies the background and the foreground and the Weight.

Hide/Reveal Bound (Multiply)

Performs a similar calculation to the Hide/Reveal (multiply), except that all values are clipped at 1 (100%).

Add

Adds the foreground multiplied by the weight to the background. The result is not clipped between 0.0 and 1.0.

Add Compensate (Blend)

Makes the brighter sections of the second layer gradually (and proportionally) screen out the darker sections of the first layer. This mode compensates the background layer prior to adding, so the resulting color never exceeds 1.0 (100%).

Tip: You can use this mode to blend two high-intensity images without losing detail.

Add (Bound)

Performs a similar calculation to the Add mode, but all values are clipped between 0.0 and 1.0.

Lighter

Sets each channel of each pixel to whichever value is lighter: the background, or the foreground multiplied by the weight.

Darker

Sets each channel of each pixel to whichever value is darker: the background, or the foreground multiplied by the weight.

Soft Light

Mixes the background and foreground, then reveals the resulting color with the brightest pixels of the foreground.

Hard Light

Uses the bright pixels of the background to brighten the foreground, and the dark pixels of the background to darken foreground. Visually, each layer is pushing the other layer's extreme pixel values; that is, the darks become darker and the lighter parts become brighter.

Difference

Subtracts the foreground multiplied by the Weight from the background, and uses the absolute value of the result.

Hue Offset (Overlay)

Makes the darkest pixels of the foreground dim the gamma and boost the contrast of the background. Meanwhile, the brighter pixels of the foreground boost the gamma and dim the contrast of the background. The brighter the foreground, the more it offsets the background's hue. Visually, you're controlling both the gamma and the contrast values simultaneously on different parts of the image.

Screen

Inverts the background as well as the foreground multiplied by the Weight, inverts the two values, multiplies the results together, and then inverts the final result.