<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "ShaderGraph-Docs",
  "identifier" : "/documentation/ShaderGraph/Logic",
  "metadataVersion" : "0.1.0",
  "role" : "ShaderGraph Node Group",
  "symbol" : {
    "kind" : "ShaderGraph Node Group",
    "modules" : [
      "ShaderGraph"
    ],
    "preciseIdentifier" : "conditional"
  },
  "title" : "Logic"
}
-->

# Logic

Perform Boolean operations and other logical comparisons on data values.

## Overview

Use Logic nodes to facilitate decision trees and other logic-based choices within your graph. You can perform comparisons for equality or to determine if one value is larger than another. You can also perform logic operations on Boolean values.

## Topics

### Nodes

[`If Greater`](/documentation/ShaderGraph/Logic/If-Greater)

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

[`If Greater Or Equal`](/documentation/ShaderGraph/Logic/If-Greater-Or-Equal)

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

[`If Equal`](/documentation/ShaderGraph/Logic/If-Equal)

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

[`Switch`](/documentation/ShaderGraph/Logic/Switch)

Outputs the value from one of ten input streams, according to a selector .

[`And (RealityKit)`](/documentation/ShaderGraph/Logic/And-(RealityKit))

Boolean operation in1 && in2.

[`Or (RealityKit)`](/documentation/ShaderGraph/Logic/Or-(RealityKit))

Boolean operation in1 || in2.

[`XOR (RealityKit)`](/documentation/ShaderGraph/Logic/XOR-(RealityKit))

Returns true if only one of the inputs is true.

[`Not (RealityKit)`](/documentation/ShaderGraph/Logic/Not-(RealityKit))

Returns !input.

[`Select (RealityKit)`](/documentation/ShaderGraph/Logic/Select-(RealityKit))

Selects B if conditional is true, A if false.

[`Multiply Add 24 (RealityKit)`](/documentation/ShaderGraph/realitykit/Multiply-Add-24-(RealityKit))

Multiplies two 24-bit integer values X and Y and returns the 32-bit integer result with 32-bit Z value added.

[`Multiply 24 (RealityKit)`](/documentation/ShaderGraph/realitykit/Multiply-24-(RealityKit))

Multiplies two 24-bit integer values X and Y and returns the 32-bit integer result.



---

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)