Skip to content
0.2.0-dev Download ZIP
51 lines ·2.5 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
3 <brief_description>
4 A floating-point scalar operator to be used within the visual shader graph.
5 </brief_description>
6 <description>
7 Applies [member operator] to two floating-point inputs: [code]a[/code] and [code]b[/code].
8 </description>
9 <tutorials>
10 </tutorials>
11 <members>
12 <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0">
13 An operator to be applied to the inputs.
14 </member>
15 </members>
16 <constants>
17 <constant name="OP_ADD" value="0" enum="Operator">
18 Sums two numbers using [code]a + b[/code].
19 </constant>
20 <constant name="OP_SUB" value="1" enum="Operator">
21 Subtracts two numbers using [code]a - b[/code].
22 </constant>
23 <constant name="OP_MUL" value="2" enum="Operator">
24 Multiplies two numbers using [code]a * b[/code].
25 </constant>
26 <constant name="OP_DIV" value="3" enum="Operator">
27 Divides two numbers using [code]a / b[/code].
28 </constant>
29 <constant name="OP_MOD" value="4" enum="Operator">
30 Calculates the remainder of two numbers. Translates to [code]mod(a, b)[/code] in the Godot Shader Language.
31 </constant>
32 <constant name="OP_POW" value="5" enum="Operator">
33 Raises the [code]a[/code] to the power of [code]b[/code]. Translates to [code]pow(a, b)[/code] in the Godot Shader Language.
34 </constant>
35 <constant name="OP_MAX" value="6" enum="Operator">
36 Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
37 </constant>
38 <constant name="OP_MIN" value="7" enum="Operator">
39 Returns the lesser of two numbers. Translates to [code]min(a, b)[/code] in the Godot Shader Language.
40 </constant>
41 <constant name="OP_ATAN2" value="8" enum="Operator">
42 Returns the arc-tangent of the parameters. Translates to [code]atan(a, b)[/code] in the Godot Shader Language.
43 </constant>
44 <constant name="OP_STEP" value="9" enum="Operator">
45 Generates a step function by comparing [code]b[/code](x) to [code]a[/code](edge). Returns 0.0 if [code]x[/code] is smaller than [code]edge[/code] and otherwise 1.0. Translates to [code]step(a, b)[/code] in the Godot Shader Language.
46 </constant>
47 <constant name="OP_ENUM_SIZE" value="10" enum="Operator">
48 Represents the size of the [enum Operator] enum.
49 </constant>
50 </constants>
51</class>