- Qt 3D Studio
- Best Practices
- Blend Mode
- Qt 3D Studio 2.8 Manual

# Blend Mode

This page describes the `Blend Mode` property edited in Qt 3D Studio.

The Blend Mode property controls how the colors of the active layer or object are blended with the colors of the background layer or object.

In Qt 3D Studio both layers and object materials have the Blend Mode property. Changing Blend Mode in a layer will effect all objects in that layer while changing Blend Mode for a single object will only effect that object and it will only blend with background objects in the same layer, not with objects in other layers.

Different blend modes are using different formulas to calculate the result as described below. It is important to know that every color channel of a pixel has a value ranging from 0.0 (black) to 1.0 (white). In formulas below A is the pixel color value of the active layer or object while B is the pixel color value of the background layer or object.

Note that modes marked with * are available only with hardware supporting KHR and NV extensions.

## Blend Modes

### Normal

For both layers and objects the default blend mode is Normal. Opaque objects will occlude objects in the background.

### Screen

Screen inverts the pixel color values of both active and background layers or objects, then multiplies them and finally inverts the product. This will produce a lighter result. Black pixels in the active layer will be rendered as 100% transparent.

Formula: `1-(1-A)*(1-B)`

### Multiply

Multiply multiplies the pixel color values of both active and background layers or objects. This will produce a darker result. White pixels in the active layer will be rendered as 100% transparent.

Formula: `A*B`

### Add

Add simply adds the pixel color values of both layers. This will produce a lighter result. Black pixels in the active layer will be rendered as 100% transparent.

Formula: `A+B`

Note: Available only in Layers

### Subtract

Subtract simply subtracts the pixel color value of the active layer or object from the pixel color value of the background layer or object. This will produce a darker result.

Formula: `B-A`

Note: Available only in Layers

### Overlay

Overlay uses a combination of Multiply and Screen modes. Basically it uses Screen mode on lighter pixels and Multiply mode on darker pixels. This will produce a result with increased contrast.

### ColorBurn

ColorBurn inverts the pixel color value of the background layer or object and then divides it with the pixel color value of the active layer or object. Finally the result is inverted. This will produce a result darker than with Multiply.

Formula: `1-(1-B)/A`

### ColorDodge

ColorDodge divides the pixel color value of the background layer or object with the inverted pixel color value of the active layer or object. This will produce a result lighter than with Screen.

Formula: `B/(1-A)`