You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/shaders/visual_shaders.rst
+50Lines changed: 50 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,56 @@ the vector will take the value of the scalar.
92
92
When connecting any ``vector`` output to a ``scalar`` input, the value of the
93
93
scalar will be the average of the vector's components.
94
94
95
+
Visual Shader node interface
96
+
------------------------------
97
+
98
+
Visual shader nodes have input and output ports. The input ports are located on the left side of the node, and output ports are located on the right side of the node.
99
+
100
+
.. figure:: img/vs_node.webp
101
+
102
+
These ports are colored to differentiate type of port:
103
+
104
+
.. |scalar| image:: img/vs_scalar.webp
105
+
.. |vector| image:: img/vs_vector.webp
106
+
.. |boolean| image:: img/vs_boolean.webp
107
+
.. |transform| image:: img/vs_transform.webp
108
+
.. |sampler| image:: img/vs_sampler.webp
109
+
110
+
111
+
.. list-table:: Port types
112
+
:widths: auto
113
+
:header-rows: 1
114
+
115
+
* - Type
116
+
- Color
117
+
- Description
118
+
- Example
119
+
* - Scalar
120
+
- Cyan
121
+
- Scalar is a single value.
122
+
- |scalar|
123
+
* - Vector
124
+
- Purple
125
+
- Vector is a set of values.
126
+
- |vector|
127
+
* - Boolean
128
+
- Blue
129
+
- On or off, true or false.
130
+
- |boolean|
131
+
* - Transform
132
+
- Orange
133
+
- A matrix, usually used to transform vertices.
134
+
- |transform|
135
+
* - Sampler
136
+
- Yellow
137
+
- A texture sampler. It can be used to sample textures.
138
+
- |sampler|
139
+
140
+
All of the types are used in the calculations of vertices, fragments, and lights in the shader. For example: matrix multiplication,
141
+
vector addition, or scalar division.
142
+
143
+
There are other types but these are the main ones.
0 commit comments