<!--
{
  "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/Logic/If-Greater",
  "metadataVersion" : "0.1.0",
  "role" : "ShaderGraph Node",
  "symbol" : {
    "kind" : "ShaderGraph Node",
    "modules" : [
      "ShaderGraph"
    ],
    "preciseIdentifier" : "Shader_ND_ifgreater_float"
  },
  "title" : "If Greater"
}
-->

# If Greater

Outputs True Result or False Result depending on whether value1 > value2.

## Parameter Types

**If Greater (float):**

|Input         |Type |
                |--------------|-----|
                |`Value1`      |Float|
                |`Value2`      |Float|
                |`True Result` |Float|
                |`False Result`|Float|

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

**If Greater (vector2h integer):**

|Input   |Type    |
                |--------|--------|
                |`Value1`|Int32   |
                |`Value2`|Int32   |
                |`In 1`  |Vector2h|
                |`In 2`  |Vector2h|

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

**If Greater (Float integer):**

|Input         |Type |
                |--------------|-----|
                |`Value1`      |Int32|
                |`Value2`      |Int32|
                |`True Result` |Float|
                |`False Result`|Float|

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

**If Greater (vector3h):**

|Input   |Type    |
                |--------|--------|
                |`Value1`|Float   |
                |`Value2`|Float   |
                |`In 1`  |Vector3h|
                |`In 2`  |Vector3h|

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

**If Greater (vector2f integer):**

|Input         |Type    |
                |--------------|--------|
                |`Value1`      |Int32   |
                |`Value2`      |Int32   |
                |`True Result` |Vector2f|
                |`False Result`|Vector2f|

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

**If Greater (vector4f):**

|Input         |Type    |
                |--------------|--------|
                |`Value1`      |Float   |
                |`Value2`      |Float   |
                |`True Result` |Vector4f|
                |`False Result`|Vector4f|

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

**If Greater (vector4h):**

|Input   |Type    |
                |--------|--------|
                |`Value1`|Float   |
                |`Value2`|Float   |
                |`In 1`  |Vector4h|
                |`In 2`  |Vector4h|

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

**If Greater (vector4h integer):**

|Input   |Type    |
                |--------|--------|
                |`Value1`|Int32   |
                |`Value2`|Int32   |
                |`In 1`  |Vector4h|
                |`In 2`  |Vector4h|

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

**If Greater (color3f):**

|Input         |Type         |
                |--------------|-------------|
                |`Value1`      |Float        |
                |`Value2`      |Float        |
                |`True Result` |Color3<Float>|
                |`False Result`|Color3<Float>|

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

**If Greater (vector4f integer):**

|Input         |Type    |
                |--------------|--------|
                |`Value1`      |Int32   |
                |`Value2`      |Int32   |
                |`True Result` |Vector4f|
                |`False Result`|Vector4f|

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

**If Greater (half integer):**

|Input   |Type |
                |--------|-----|
                |`Value1`|Int32|
                |`Value2`|Int32|
                |`In 1`  |Half |
                |`In 2`  |Half |

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

**If Greater (vector3f):**

|Input         |Type    |
                |--------------|--------|
                |`Value1`      |Float   |
                |`Value2`      |Float   |
                |`True Result` |Vector3f|
                |`False Result`|Vector3f|

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

**If Greater (vector3h integer):**

|Input   |Type    |
                |--------|--------|
                |`Value1`|Int32   |
                |`Value2`|Int32   |
                |`In 1`  |Vector3h|
                |`In 2`  |Vector3h|

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

**If Greater (color4f integer):**

|Input         |Type         |
                |--------------|-------------|
                |`Value1`      |Int32        |
                |`Value2`      |Int32        |
                |`True Result` |Color4<Float>|
                |`False Result`|Color4<Float>|

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

**If Greater (half):**

|Input   |Type|
                |--------|----|
                |`Value1`|Half|
                |`Value2`|Half|
                |`In 1`  |Half|
                |`In 2`  |Half|

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

**If Greater (vector2f):**

|Input         |Type    |
                |--------------|--------|
                |`Value1`      |Float   |
                |`Value2`      |Float   |
                |`True Result` |Vector2f|
                |`False Result`|Vector2f|

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

**If Greater (color4f):**

|Input         |Type         |
                |--------------|-------------|
                |`Value1`      |Float        |
                |`Value2`      |Float        |
                |`True Result` |Color4<Float>|
                |`False Result`|Color4<Float>|

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

**If Greater (color3f integer):**

|Input         |Type         |
                |--------------|-------------|
                |`Value1`      |Int32        |
                |`Value2`      |Int32        |
                |`True Result` |Color3<Float>|
                |`False Result`|Color3<Float>|

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

**If Greater (vector3f integer):**

|Input         |Type    |
                |--------------|--------|
                |`Value1`      |Int32   |
                |`Value2`      |Int32   |
                |`True Result` |Vector3f|
                |`False Result`|Vector3f|

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

**If Greater (vector2h):**

|Input   |Type    |
                |--------|--------|
                |`Value1`|Float   |
                |`Value2`|Float   |
                |`In 1`  |Vector2h|
                |`In 2`  |Vector2h|

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

## Parameter descriptions

- `Value1`: The first value to compare.
- `Value2`: The second value to compare.
- `True Result`: The output of the node if the `Value1` input parameter is greater than the `Value2` input parameter.
- `False Result`: The output of the node if the `Value1` input parameter isn’t greater than the `Value2` input parameter.

---

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)