1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNode" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Base class for nodes in a visual shader graph.
</brief_description>
<description>
Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node has also connection ports that allow to connect it to another nodes and control the flow of the shader.
</description>
<tutorials>
<link title="VisualShaders">$DOCS_URL/tutorials/shaders/visual_shaders.html</link>
</tutorials>
<methods>
<method name="clear_default_input_values">
<return type="void" />
<description>
Clears the default input ports value.
</description>
</method>
<method name="get_default_input_values" qualifiers="const">
<return type="Array" />
<description>
Returns an [Array] containing default values for all of the input ports of the node in the form [code][index0, value0, index1, value1, ...][/code].
</description>
</method>
<method name="get_input_port_default_value" qualifiers="const">
<return type="Variant" />
<param index="0" name="port" type="int" />
<description>
Returns the default value of the input [param port].
</description>
</method>
<method name="remove_input_port_default_value">
<return type="void" />
<param index="0" name="port" type="int" />
<description>
Removes the default value of the input [param port].
</description>
</method>
<method name="set_default_input_values">
<return type="void" />
<param index="0" name="values" type="Array" />
<description>
Sets the default input ports values using an [Array] of the form [code][index0, value0, index1, value1, ...][/code]. For example: [code][0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)][/code].
</description>
</method>
<method name="set_input_port_default_value">
<return type="void" />
<param index="0" name="port" type="int" />
<param index="1" name="value" type="Variant" />
<param index="2" name="prev_value" type="Variant" default="null" />
<description>
Sets the default [param value] for the selected input [param port].
</description>
</method>
</methods>
<members>
<member name="output_port_for_preview" type="int" setter="set_output_port_for_preview" getter="get_output_port_for_preview" default="-1">
Sets the output port index which will be showed for preview. If set to [code]-1[/code] no port will be open for preview.
</member>
</members>
<signals>
<signal name="editor_refresh_request">
<description>
Emitted when the node requests an editor refresh. Currently called only in setter of [member VisualShaderNodeTexture.source], [VisualShaderNodeTexture], and [VisualShaderNodeCubemap] (and their derivatives).
</description>
</signal>
</signals>
<constants>
<constant name="PORT_TYPE_SCALAR" value="0" enum="PortType">
Floating-point scalar. Translated to [code]float[/code] type in shader code.
</constant>
<constant name="PORT_TYPE_SCALAR_INT" value="1" enum="PortType">
Integer scalar. Translated to [code]int[/code] type in shader code.
</constant>
<constant name="PORT_TYPE_VECTOR_2D" value="2" enum="PortType">
2D vector of floating-point values. Translated to [code]vec2[/code] type in shader code.
</constant>
<constant name="PORT_TYPE_VECTOR_3D" value="3" enum="PortType">
3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code.
</constant>
<constant name="PORT_TYPE_VECTOR_4D" value="4" enum="PortType">
4D vector of floating-point values. Translated to [code]vec4[/code] type in shader code.
</constant>
<constant name="PORT_TYPE_BOOLEAN" value="5" enum="PortType">
Boolean type. Translated to [code]bool[/code] type in shader code.
</constant>
<constant name="PORT_TYPE_TRANSFORM" value="6" enum="PortType">
Transform type. Translated to [code]mat4[/code] type in shader code.
</constant>
<constant name="PORT_TYPE_SAMPLER" value="7" enum="PortType">
Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes.
</constant>
<constant name="PORT_TYPE_MAX" value="8" enum="PortType">
Represents the size of the [enum PortType] enum.
</constant>
</constants>
</class>
|