From f101add78beb152b4c5ecd735534e9d462bbadaa Mon Sep 17 00:00:00 2001 From: Yuri Rubinsky Date: Tue, 27 Dec 2022 20:49:11 +0300 Subject: Add `uint` type support to visual shaders --- doc/classes/VisualShader.xml | 14 ++++--- doc/classes/VisualShaderNode.xml | 17 ++++---- doc/classes/VisualShaderNodeClamp.xml | 11 ++++-- doc/classes/VisualShaderNodeCompare.xml | 15 ++++--- doc/classes/VisualShaderNodeSwitch.xml | 15 ++++--- doc/classes/VisualShaderNodeUIntConstant.xml | 16 ++++++++ doc/classes/VisualShaderNodeUIntFunc.xml | 27 +++++++++++++ doc/classes/VisualShaderNodeUIntOp.xml | 57 +++++++++++++++++++++++++++ doc/classes/VisualShaderNodeUIntParameter.xml | 15 +++++++ 9 files changed, 158 insertions(+), 29 deletions(-) create mode 100644 doc/classes/VisualShaderNodeUIntConstant.xml create mode 100644 doc/classes/VisualShaderNodeUIntFunc.xml create mode 100644 doc/classes/VisualShaderNodeUIntOp.xml create mode 100644 doc/classes/VisualShaderNodeUIntParameter.xml (limited to 'doc') diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index a2089ae2b8..2d59810a5f 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -208,17 +208,19 @@ - + - + - + - + - + - + + + diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 1f3397f39c..f95f871e52 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -72,25 +72,28 @@ Integer scalar. Translated to [code]int[/code] type in shader code. - + + Unsigned integer scalar. Translated to [code]uint[/code] type in shader code. + + 2D vector of floating-point values. Translated to [code]vec2[/code] type in shader code. - + 3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code. - + 4D vector of floating-point values. Translated to [code]vec4[/code] type in shader code. - + Boolean type. Translated to [code]bool[/code] type in shader code. - + Transform type. Translated to [code]mat4[/code] type in shader code. - + Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. - + Represents the size of the [enum PortType] enum. diff --git a/doc/classes/VisualShaderNodeClamp.xml b/doc/classes/VisualShaderNodeClamp.xml index 35f50a37c3..642a98ec8c 100644 --- a/doc/classes/VisualShaderNodeClamp.xml +++ b/doc/classes/VisualShaderNodeClamp.xml @@ -20,16 +20,19 @@ An integer scalar. - + + An unsigned integer scalar. + + A 2D vector type. - + A 3D vector type. - + A 4D vector type. - + Represents the size of the [enum OpType] enum. diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml index 942ced2ebd..19ed42d1c7 100644 --- a/doc/classes/VisualShaderNodeCompare.xml +++ b/doc/classes/VisualShaderNodeCompare.xml @@ -26,22 +26,25 @@ An integer scalar. - + + An unsigned integer scalar. + + A 2D vector type. - + A 3D vector type. - + A 4D vector type. - + A boolean type. - + A transform ([code]mat4[/code]) type. - + Represents the size of the [enum ComparisonType] enum. diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml index e74ff6e162..3fda4eb2b8 100644 --- a/doc/classes/VisualShaderNodeSwitch.xml +++ b/doc/classes/VisualShaderNodeSwitch.xml @@ -20,22 +20,25 @@ An integer scalar. - + + An unsigned integer scalar. + + A 2D vector type. - + A 3D vector type. - + A 4D vector type. - + A boolean type. - + A transform type. - + Represents the size of the [enum OpType] enum. diff --git a/doc/classes/VisualShaderNodeUIntConstant.xml b/doc/classes/VisualShaderNodeUIntConstant.xml new file mode 100644 index 0000000000..926e4e11d2 --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntConstant.xml @@ -0,0 +1,16 @@ + + + + An unsigned scalar integer constant to be used within the visual shader graph. + + + Translated to [code]uint[/code] in the shader language. + + + + + + An unsigned integer constant which represents a state of this node. + + + diff --git a/doc/classes/VisualShaderNodeUIntFunc.xml b/doc/classes/VisualShaderNodeUIntFunc.xml new file mode 100644 index 0000000000..c0c591304a --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntFunc.xml @@ -0,0 +1,27 @@ + + + + An unsigned scalar integer function to be used within the visual shader graph. + + + Accept an unsigned integer scalar ([code]x[/code]) to the input port and transform it according to [member function]. + + + + + + A function to be applied to the scalar. See [enum Function] for options. + + + + + Negates the [code]x[/code] using [code]-(x)[/code]. + + + Returns the result of bitwise [code]NOT[/code] operation on the integer. Translates to [code]~a[/code] in the Godot Shader Language. + + + Represents the size of the [enum Function] enum. + + + diff --git a/doc/classes/VisualShaderNodeUIntOp.xml b/doc/classes/VisualShaderNodeUIntOp.xml new file mode 100644 index 0000000000..44f71286e3 --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntOp.xml @@ -0,0 +1,57 @@ + + + + An unsigned integer scalar operator to be used within the visual shader graph. + + + Applies [member operator] to two unsigned integer inputs: [code]a[/code] and [code]b[/code]. + + + + + + An operator to be applied to the inputs. See [enum Operator] for options. + + + + + Sums two numbers using [code]a + b[/code]. + + + Subtracts two numbers using [code]a - b[/code]. + + + Multiplies two numbers using [code]a * b[/code]. + + + Divides two numbers using [code]a / b[/code]. + + + Calculates the remainder of two numbers using [code]a % b[/code]. + + + Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + + + Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + + + Returns the result of bitwise [code]AND[/code] operation on the integer. Translates to [code]a & b[/code] in the Godot Shader Language. + + + Returns the result of bitwise [code]OR[/code] operation for two integers. Translates to [code]a | b[/code] in the Godot Shader Language. + + + Returns the result of bitwise [code]XOR[/code] operation for two integers. Translates to [code]a ^ b[/code] in the Godot Shader Language. + + + Returns the result of bitwise left shift operation on the integer. Translates to [code]a << b[/code] in the Godot Shader Language. + + + Returns the result of bitwise right shift operation on the integer. Translates to [code]a >> b[/code] in the Godot Shader Language. + + + Represents the size of the [enum Operator] enum. + + + diff --git a/doc/classes/VisualShaderNodeUIntParameter.xml b/doc/classes/VisualShaderNodeUIntParameter.xml new file mode 100644 index 0000000000..3b549c84f7 --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntParameter.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + -- cgit v1.2.3