Skip to content
0.2.0-dev Download ZIP
33 lines ·1.5 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
3 <brief_description>
4 A scalar integer function to be used within the visual shader graph.
5 </brief_description>
6 <description>
7 Accept an integer scalar ([code]x[/code]) to the input port and transform it according to [member function].
8 </description>
9 <tutorials>
10 </tutorials>
11 <members>
12 <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="2">
13 A function to be applied to the scalar.
14 </member>
15 </members>
16 <constants>
17 <constant name="FUNC_ABS" value="0" enum="Function">
18 Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
19 </constant>
20 <constant name="FUNC_NEGATE" value="1" enum="Function">
21 Negates the [code]x[/code] using [code]-(x)[/code].
22 </constant>
23 <constant name="FUNC_SIGN" value="2" enum="Function">
24 Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
25 </constant>
26 <constant name="FUNC_BITWISE_NOT" value="3" enum="Function">
27 Returns the result of bitwise [code]NOT[/code] operation on the integer. Translates to [code]~a[/code] in the Godot Shader Language.
28 </constant>
29 <constant name="FUNC_MAX" value="4" enum="Function">
30 Represents the size of the [enum Function] enum.
31 </constant>
32 </constants>
33</class>