<!--
{
  "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",
  "identifier" : "/documentation/ShaderGraph/Adjustment/Contrast",
  "metadataVersion" : "0.1.0",
  "role" : "ShaderGraph Node",
  "symbol" : {
    "kind" : "ShaderGraph Node",
    "modules" : [
      "ShaderGraph"
    ],
    "preciseIdentifier" : "Shader_ND_contrast_float"
  },
  "title" : "Contrast"
}
-->

# Contrast

Increases or decreases contrast of values using a linear slope multiplier.

## Parameter Types

**Contrast (float):**

|Input   |Type |
                |--------|-----|
                |`In`    |Float|
                |`Amount`|Float|
                |`Pivot` |Float|

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

**Contrast (vector3f FA):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector3f|
                |`Amount`|Float   |
                |`Pivot` |Float   |

|Output|Type    |
                |------|--------|
                |`Out` |Vector3f|

**Contrast (vector2f):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector2f|
                |`Amount`|Vector2f|
                |`Pivot` |Vector2f|

|Output|Type    |
                |------|--------|
                |`Out` |Vector2f|

**Contrast (color4f):**

|Input   |Type         |
                |--------|-------------|
                |`In`    |Color4<Float>|
                |`Amount`|Color4<Float>|
                |`Pivot` |Color4<Float>|

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

**Contrast (vector4f):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector4f|
                |`Amount`|Vector4f|
                |`Pivot` |Vector4f|

|Output|Type    |
                |------|--------|
                |`Out` |Vector4f|

**Contrast (vector3h FA):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector3h|
                |`Amount`|Half    |
                |`Pivot` |Half    |

|Output|Type    |
                |------|--------|
                |`Out` |Vector3h|

**Contrast (color4f FA):**

|Input   |Type         |
                |--------|-------------|
                |`In`    |Color4<Float>|
                |`Amount`|Float        |
                |`Pivot` |Float        |

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

**Contrast (half):**

|Input   |Type|
                |--------|----|
                |`In`    |Half|
                |`Amount`|Half|
                |`Pivot` |Half|

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

**Contrast (vector3h):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector3h|
                |`Amount`|Vector3h|
                |`Pivot` |Vector3h|

|Output|Type    |
                |------|--------|
                |`Out` |Vector3h|

**Contrast (vector2f FA):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector2f|
                |`Amount`|Float   |
                |`Pivot` |Float   |

|Output|Type    |
                |------|--------|
                |`Out` |Vector2f|

**Contrast (vector4h FA):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector4h|
                |`Amount`|Half    |
                |`Pivot` |Half    |

|Output|Type    |
                |------|--------|
                |`Out` |Vector4h|

**Contrast (vector3f):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector3f|
                |`Amount`|Vector3f|
                |`Pivot` |Vector3f|

|Output|Type    |
                |------|--------|
                |`Out` |Vector3f|

**Contrast (vector2h):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector2h|
                |`Amount`|Vector2h|
                |`Pivot` |Vector2h|

|Output|Type    |
                |------|--------|
                |`Out` |Vector2h|

**Contrast (vector4h):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector4h|
                |`Amount`|Vector4h|
                |`Pivot` |Vector4h|

|Output|Type    |
                |------|--------|
                |`Out` |Vector4h|

**Contrast (color3f FA):**

|Input   |Type         |
                |--------|-------------|
                |`In`    |Color3<Float>|
                |`Amount`|Float        |
                |`Pivot` |Float        |

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

**Contrast (vector2h FA):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector2h|
                |`Amount`|Half    |
                |`Pivot` |Half    |

|Output|Type    |
                |------|--------|
                |`Out` |Vector2h|

**Contrast (vector4f FA):**

|Input   |Type    |
                |--------|--------|
                |`In`    |Vector4f|
                |`Amount`|Float   |
                |`Pivot` |Float   |

|Output|Type    |
                |------|--------|
                |`Out` |Vector4f|

**Contrast (color3f):**

|Input   |Type         |
                |--------|-------------|
                |`In`    |Color3<Float>|
                |`Amount`|Color3<Float>|
                |`Pivot` |Color3<Float>|

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

## Parameter descriptions

- `In`: The input value to modify.
- `Amount`: The linear slope multiplier that increases or decreases the contrast. A value between `0.0` and `1.0` decreases the contrast of the `In` parameter, while a value greater than `1.0` increases it.
- `Pivot`: The center value of the contrast adjustment. As contrast increases, values of the `In` parameter get further away from this value. As contrast decreases, values of the `In` parameter get closer to this value.

## Discussion

Below is an example of a node graph that uses the `Contrast` node to make a black and white arrow texture more gray and closer in color.

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

Below, the resulting texture applies to a cube:

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

In the image above, the value of `Pivot` is `0.2`, which represents a dark gray. Because the value of `Amount` is also `0.2`, the contrast of the input decreases while the color value of the texture moves closer to the `Pivot` input.
As a result, the output texture of the node becomes a gray version of the original black and white arrow texture.

---

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)