<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ShaderGraph-Docs",
  "identifier" : "/documentation/ShaderGraph/Compositing/Subtractive-Mix",
  "metadataVersion" : "0.1.0",
  "role" : "ShaderGraph Node",
  "symbol" : {
    "kind" : "ShaderGraph Node",
    "modules" : [
      "ShaderGraph"
    ],
    "preciseIdentifier" : "Shader_ND_minus_float"
  },
  "title" : "Subtractive Mix"
}
-->

# Subtractive Mix

Subtracts foreground from background values.

## Overview

B - F

## Parameter Types

**Subtractive Mix (float):**

|Input       |Type |
                |------------|-----|
                |`Foreground`|Float|
                |`Background`|Float|
                |`Mix`       |Float|

|Output|Type |
                |------|-----|
                |`Out` |Float|

**Subtractive Mix (color4f):**

|Input       |Type         |
                |------------|-------------|
                |`Foreground`|Color4<Float>|
                |`Background`|Color4<Float>|
                |`Mix`       |Float        |

|Output|Type         |
                |------|-------------|
                |`Out` |Color4<Float>|

**Subtractive Mix (color3f):**

|Input       |Type         |
                |------------|-------------|
                |`Foreground`|Color3<Float>|
                |`Background`|Color3<Float>|
                |`Mix`       |Float        |

|Output|Type         |
                |------|-------------|
                |`Out` |Color3<Float>|

**Subtractive Mix (half):**

|Input       |Type|
                |------------|----|
                |`Foreground`|Half|
                |`Background`|Half|
                |`Mix`       |Half|

|Output|Type|
                |------|----|
                |`Out` |Half|

## Parameter descriptions

- `Foreground`: The foreground input, represented by `F` in the mathematical equation.
- `Background`: The background input, represented by `B` in the mathematical equation.
- `Mix`: The weight of the blend effect. The higher the `Mix`, the greater the intensity of the blend operation, and the more the effect is visually apparent. The default value is `1`. Values outside of the range `0-1` produce an undefined effect outside of the node’s intended function.

## Discussion

The `Subtractive Mix` node subtracts two inputs and uses the `Mix` input to determine the weight of the foreground in the blend, represented by the equation `B - F`. Higher values closer to `1` output a more intense subtractive mix, while lower values closer to `0` dim the effect.

Below is an example of a simple node graph that uses the subtractive mix node to blend two images into a single material:

![](images/ShaderGraph-Docs/SubtractiveMixGraph.png)

Below are two images and the resulting blended texture applied to a cube:



![](images/ShaderGraph-Docs/MixMaterial1~dark.png)



![](images/ShaderGraph-Docs/BrickTexture~dark.png)

![](images/ShaderGraph-Docs/SubtractiveMixMaterial~dark.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)