Skip to main content

Information

In material and shader development, performance is everything. Usually, creating complex logic in the Material Editor leads to cluttered node networks and higher instruction counts, which can slow down your game.

Conditional Statements fixes this. It is a collection of 10 material functions that expands the standard IF node into a full set of logical tools. This allows you to build smarter materials that are easier to read and faster for the GPU to process.

What is a Conditional Statement?

A conditional statement is a simple rule in your code. It checks whether a condition is true or false, then changes how the material behaves based on that result.

While the default IF node is a good start, this collection gives you the missing pieces to handle advanced logic without the performance overhead.

See the images for a visual explanation of how they work.

Included Nodes

  • AND (&&)
  • EQUAL (==)
  • Greater Than (>)
  • Greater Than Or Equal (>=)
  • Less Than (<)
  • Less Than Or Equal (<=)
  • NOT (!)
  • NOT EQUAL (!=)
  • OR (||)
  • XOR (^)