0
Abgelehnt

Boolean Node

Virtus H vor 8 Jahren aktualisiert von Freya Holmér (Developer) vor 8 Jahren 1

A node that has inputs similar to the 'if' node, but has 2 outputs: 'true' and 'false'.


I'd like to be able to simply branch the node logic, so that I can skip expensive calculation based on distance to the object being shaded. I'm not sure if there is another way to do this, but either way, a boolean node would be incredibly useful.

Antwort

Antwort
Abgelehnt

Generally it's cheaper to not branch, and instead render both and multiply the one with 0 and the other with 1, depending on your use case. It's also a question where you want to get the bool value from. What is true? Whether or not a value is beyond a certain threshold? For that, you can use the Step node. You might also want to look into the Toggle and Switch nodes

Antwort
Abgelehnt

Generally it's cheaper to not branch, and instead render both and multiply the one with 0 and the other with 1, depending on your use case. It's also a question where you want to get the bool value from. What is true? Whether or not a value is beyond a certain threshold? For that, you can use the Step node. You might also want to look into the Toggle and Switch nodes