Skip to content
0.2.0-dev Download ZIP
81 lines ·3.9 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="VisualShaderNodeCompare" inherits="VisualShaderNode" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
3 <brief_description>
4 A comparison function for common types within the visual shader graph.
5 </brief_description>
6 <description>
7 Compares [code]a[/code] and [code]b[/code] of [member type] by [member function]. Returns a boolean scalar. Translates to [code]if[/code] instruction in shader code.
8 </description>
9 <tutorials>
10 </tutorials>
11 <members>
12 <member name="condition" type="int" setter="set_condition" getter="get_condition" enum="VisualShaderNodeCompare.Condition" default="0">
13 Extra condition which is applied if [member type] is set to [constant CTYPE_VECTOR_3D].
14 </member>
15 <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeCompare.Function" default="0">
16 A comparison function.
17 </member>
18 <member name="type" type="int" setter="set_comparison_type" getter="get_comparison_type" enum="VisualShaderNodeCompare.ComparisonType" default="0">
19 The type to be used in the comparison.
20 </member>
21 </members>
22 <constants>
23 <constant name="CTYPE_SCALAR" value="0" enum="ComparisonType">
24 A floating-point scalar.
25 </constant>
26 <constant name="CTYPE_SCALAR_INT" value="1" enum="ComparisonType">
27 An integer scalar.
28 </constant>
29 <constant name="CTYPE_SCALAR_UINT" value="2" enum="ComparisonType">
30 An unsigned integer scalar.
31 </constant>
32 <constant name="CTYPE_VECTOR_2D" value="3" enum="ComparisonType">
33 A 2D vector type.
34 </constant>
35 <constant name="CTYPE_VECTOR_3D" value="4" enum="ComparisonType">
36 A 3D vector type.
37 </constant>
38 <constant name="CTYPE_VECTOR_4D" value="5" enum="ComparisonType">
39 A 4D vector type.
40 </constant>
41 <constant name="CTYPE_BOOLEAN" value="6" enum="ComparisonType">
42 A boolean type.
43 </constant>
44 <constant name="CTYPE_TRANSFORM" value="7" enum="ComparisonType">
45 A transform ([code]mat4[/code]) type.
46 </constant>
47 <constant name="CTYPE_MAX" value="8" enum="ComparisonType">
48 Represents the size of the [enum ComparisonType] enum.
49 </constant>
50 <constant name="FUNC_EQUAL" value="0" enum="Function">
51 Comparison for equality ([code]a == b[/code]).
52 </constant>
53 <constant name="FUNC_NOT_EQUAL" value="1" enum="Function">
54 Comparison for inequality ([code]a != b[/code]).
55 </constant>
56 <constant name="FUNC_GREATER_THAN" value="2" enum="Function">
57 Comparison for greater than ([code]a &gt; b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
58 </constant>
59 <constant name="FUNC_GREATER_THAN_EQUAL" value="3" enum="Function">
60 Comparison for greater than or equal ([code]a &gt;= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
61 </constant>
62 <constant name="FUNC_LESS_THAN" value="4" enum="Function">
63 Comparison for less than ([code]a &lt; b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
64 </constant>
65 <constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function">
66 Comparison for less than or equal ([code]a &lt;= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
67 </constant>
68 <constant name="FUNC_MAX" value="6" enum="Function">
69 Represents the size of the [enum Function] enum.
70 </constant>
71 <constant name="COND_ALL" value="0" enum="Condition">
72 The result will be [code]true[/code] if all components in the vector satisfy the comparison condition.
73 </constant>
74 <constant name="COND_ANY" value="1" enum="Condition">
75 The result will be [code]true[/code] if any component in the vector satisfies the comparison condition.
76 </constant>
77 <constant name="COND_MAX" value="2" enum="Condition">
78 Represents the size of the [enum Condition] enum.
79 </constant>
80 </constants>
81</class>