diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-26 10:11:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 10:11:24 +0100 |
commit | 1e57b558f215dd4920768e9567b6f55825877c89 (patch) | |
tree | ecec07d232d05d65b9abbfd3ffa68f893c09ec1b /doc/classes | |
parent | 3a4c128f07cb744ed37529d8206e04cd0fa2e374 (diff) | |
parent | 4a3d2776232616479d1c484e0ac9f2d8c9566236 (diff) |
Merge pull request #36536 from Chaosus/vs_int
Add support for integer type in visual shaders
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/VisualShaderNode.xml | 13 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeFloatConstant.xml (renamed from doc/classes/VisualShaderNodeScalarConstant.xml) | 2 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeFloatFunc.xml (renamed from doc/classes/VisualShaderNodeScalarFunc.xml) | 4 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeFloatOp.xml (renamed from doc/classes/VisualShaderNodeScalarOp.xml) | 4 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeFloatUniform.xml (renamed from doc/classes/VisualShaderNodeScalarUniform.xml) | 6 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeIntConstant.xml | 17 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeIntFunc.xml | 25 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeIntOp.xml | 31 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeIntUniform.xml | 38 |
9 files changed, 127 insertions, 13 deletions
diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index d3227f421e..72ce743656 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -61,19 +61,22 @@ <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_VECTOR" value="1" enum="PortType"> + <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" value="2" enum="PortType"> 3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code. </constant> - <constant name="PORT_TYPE_BOOLEAN" value="2" enum="PortType"> + <constant name="PORT_TYPE_BOOLEAN" value="3" enum="PortType"> Boolean type. Translated to [code]bool[/code] type in shader code. </constant> - <constant name="PORT_TYPE_TRANSFORM" value="3" enum="PortType"> + <constant name="PORT_TYPE_TRANSFORM" value="4" enum="PortType"> Transform type. Translated to [code]mat4[/code] type in shader code. </constant> - <constant name="PORT_TYPE_SAMPLER" value="4" enum="PortType"> + <constant name="PORT_TYPE_SAMPLER" value="5" 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="5" enum="PortType"> + <constant name="PORT_TYPE_MAX" value="6" enum="PortType"> Represents the size of the [enum PortType] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeScalarConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml index f7b94d9e39..267570121d 100644 --- a/doc/classes/VisualShaderNodeScalarConstant.xml +++ b/doc/classes/VisualShaderNodeFloatConstant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarConstant" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/VisualShaderNodeScalarFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml index b306d198f6..de1f902f2c 100644 --- a/doc/classes/VisualShaderNodeScalarFunc.xml +++ b/doc/classes/VisualShaderNodeFloatFunc.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarFunc" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeFloatFunc" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarFunc.Function" default="13"> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeFloatFunc.Function" default="13"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeScalarOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml index f13f16cdd2..50ba08701c 100644 --- a/doc/classes/VisualShaderNodeScalarOp.xml +++ b/doc/classes/VisualShaderNodeFloatOp.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarOp" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeScalarOp.Operator" default="0"> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeScalarUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml index fab766d3f9..33ece8ac1b 100644 --- a/doc/classes/VisualShaderNodeScalarUniform.xml +++ b/doc/classes/VisualShaderNodeFloatUniform.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarUniform" inherits="VisualShaderNodeUniform" version="4.0"> +<class name="VisualShaderNodeFloatUniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> - A scalar uniform to be used within the visual shader graph. + A scalar float uniform to be used within the visual shader graph. </brief_description> <description> Translated to [code]uniform float[/code] in the shader language. @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeScalarUniform.Hint" default="0"> + <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatUniform.Hint" default="0"> A hint applied to the uniform, which controls the values it can take when set through the inspector. </member> <member name="max" type="float" setter="set_max" getter="get_max" default="1.0"> diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml new file mode 100644 index 0000000000..cb05d589d2 --- /dev/null +++ b/doc/classes/VisualShaderNodeIntConstant.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNode" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="constant" type="int" setter="set_constant" getter="get_constant" default="0"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml new file mode 100644 index 0000000000..9196250e38 --- /dev/null +++ b/doc/classes/VisualShaderNodeIntFunc.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="0"> + </member> + </members> + <constants> + <constant name="FUNC_ABS" value="0" enum="Function"> + </constant> + <constant name="FUNC_CLAMP" value="1" enum="Function"> + </constant> + <constant name="FUNC_NEGATE" value="2" enum="Function"> + </constant> + <constant name="FUNC_SIGN" value="3" enum="Function"> + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml new file mode 100644 index 0000000000..5e7020c75c --- /dev/null +++ b/doc/classes/VisualShaderNodeIntOp.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntOp" inherits="VisualShaderNode" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeIntOp.Operator" default="0"> + </member> + </members> + <constants> + <constant name="OP_ADD" value="0" enum="Operator"> + </constant> + <constant name="OP_SUB" value="1" enum="Operator"> + </constant> + <constant name="OP_MUL" value="2" enum="Operator"> + </constant> + <constant name="OP_DIV" value="3" enum="Operator"> + </constant> + <constant name="OP_MOD" value="4" enum="Operator"> + </constant> + <constant name="OP_MAX" value="5" enum="Operator"> + </constant> + <constant name="OP_MIN" value="6" enum="Operator"> + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml new file mode 100644 index 0000000000..8c7c288177 --- /dev/null +++ b/doc/classes/VisualShaderNodeIntUniform.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntUniform" inherits="VisualShaderNodeUniform" version="4.0"> + <brief_description> + A scalar integer uniform to be used within the visual shader graph. + </brief_description> + <description> + Translated to [code]uniform int[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeIntUniform.Hint" default="0"> + A hint applied to the uniform, which controls the values it can take when set through the inspector. + </member> + <member name="max" type="int" setter="set_max" getter="get_max" default="100"> + Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP]. + </member> + <member name="min" type="int" setter="set_min" getter="get_min" default="0"> + Maximum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP]. + </member> + <member name="step" type="int" setter="set_step" getter="get_step" default="1"> + Step (increment) value for the range hint with step. Used if [member hint] is set to [constant HINT_RANGE_STEP]. + </member> + </members> + <constants> + <constant name="HINT_NONE" value="0" enum="Hint"> + No hint used. + </constant> + <constant name="HINT_RANGE" value="1" enum="Hint"> + A range hint for scalar value, which limits possible input values between [member min] and [member max]. Translated to [code]hint_range(min, max)[/code] in shader code. + </constant> + <constant name="HINT_RANGE_STEP" value="2" enum="Hint"> + A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code. + </constant> + </constants> +</class> |