Merge pull request #55576 from Chaosus/vs_new_int_ops

Add bitwise operators to `VisualShaderNodeIntOp`
This commit is contained in:
Yuri Roubinsky 2021-12-03 14:46:33 +03:00 committed by GitHub
commit c033ed21b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 57 additions and 5 deletions

View file

@ -23,7 +23,10 @@
<constant name="FUNC_SIGN" value="2" enum="Function">
Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_MAX" value="3" enum="Function">
<constant name="FUNC_BITWISE_NOT" value="3" enum="Function">
Returns the result of bitwise [code]NOT[/code] operation on the integer. Translates to [code]~a[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_MAX" value="4" enum="Function">
Represents the size of the [enum Function] enum.
</constant>
</constants>

View file

@ -35,7 +35,22 @@
<constant name="OP_MIN" value="6" enum="Operator">
Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
</constant>
<constant name="OP_ENUM_SIZE" value="7" enum="Operator">
<constant name="OP_BITWISE_AND" value="7" enum="Operator">
Returns the result of bitwise [code]AND[/code] operation on the integer. Translates to [code]a &amp; b[/code] in the Godot Shader Language.
</constant>
<constant name="OP_BITWISE_OR" value="8" enum="Operator">
Returns the result of bitwise [code]OR[/code] operation for two integers. Translates to [code]a | b[/code] in the Godot Shader Language.
</constant>
<constant name="OP_BITWISE_XOR" value="9" enum="Operator">
Returns the result of bitwise [code]XOR[/code] operation for two integers. Translates to [code]a ^ b[/code] in the Godot Shader Language.
</constant>
<constant name="OP_BITWISE_LEFT_SHIFT" value="10" enum="Operator">
Returns the result of bitwise left shift operation on the integer. Translates to [code]a &lt;&lt; b[/code] in the Godot Shader Language.
</constant>
<constant name="OP_BITWISE_RIGHT_SHIFT" value="11" enum="Operator">
Returns the result of bitwise right shift operation on the integer. Translates to [code]a &gt;&gt; b[/code] in the Godot Shader Language.
</constant>
<constant name="OP_ENUM_SIZE" value="12" enum="Operator">
Represents the size of the [enum Operator] enum.
</constant>
</constants>