Commit 15e757ec by Yuri Roubinsky

Docs for some nodes in visual shader(part 3)

parent 1e57b558
......@@ -50,7 +50,7 @@
Comparison for less than ([code]a < b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
</constant>
<constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function">
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].
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].
</constant>
<constant name="COND_ALL" value="0" enum="Condition">
The result will be true if all of component in vector satisfy the comparison condition.
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNode" version="4.0">
<brief_description>
A scalar floating-point constant to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]float[/code] in the shader language.
</description>
<tutorials>
</tutorials>
......@@ -10,6 +12,7 @@
</methods>
<members>
<member name="constant" type="float" setter="set_constant" getter="get_constant" default="0.0">
A floating-point constant which represents a state of this node.
</member>
</members>
<constants>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeFloatFunc" inherits="VisualShaderNode" version="4.0">
<brief_description>
A scalar floating-point function to be used within the visual shader graph.
</brief_description>
<description>
Accept a floating-point scalar ([code]x[/code]) to the input port and transform it according to [member function].
</description>
<tutorials>
</tutorials>
......@@ -10,72 +12,105 @@
</methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeFloatFunc.Function" default="13">
A function to be applied to the scalar. See [enum Function] for options.
</member>
</members>
<constants>
<constant name="FUNC_SIN" value="0" enum="Function">
Returns the sine of the parameter. Translates to [code]sin(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_COS" value="1" enum="Function">
Returns the cosine of the parameter. Translates to [code]cos(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_TAN" value="2" enum="Function">
Returns the tangent of the parameter. Translates to [code]tan(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_ASIN" value="3" enum="Function">
Returns the arc-sine of the parameter. Translates to [code]asin(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_ACOS" value="4" enum="Function">
Returns the arc-cosine of the parameter. Translates to [code]acos(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_ATAN" value="5" enum="Function">
Returns the arc-tangent of the parameter. Translates to [code]atan(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_SINH" value="6" enum="Function">
Returns the hyperbolic sine of the parameter. Translates to [code]sinh(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_COSH" value="7" enum="Function">
Returns the hyperbolic cosine of the parameter. Translates to [code]cosh(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_TANH" value="8" enum="Function">
Returns the hyperbolic tangent of the parameter. Translates to [code]tanh(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_LOG" value="9" enum="Function">
Returns the natural logarithm of the parameter. Translates to [code]log(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_EXP" value="10" enum="Function">
Returns the natural exponentiation of the parameter. Translates to [code]exp(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_SQRT" value="11" enum="Function">
Returns the square root of the parameter. Translates to [code]sqrt(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_ABS" value="12" enum="Function">
Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_SIGN" value="13" enum="Function">
Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_FLOOR" value="14" enum="Function">
Finds the nearest integer less than or equal to the parameter. Translates to [code]floor(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_ROUND" value="15" enum="Function">
Finds the nearest integer to the parameter. Translates to [code]round(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_CEIL" value="16" enum="Function">
Finds the nearest integer that is greater than or equal to the parameter. Translates to [code]ceil(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_FRAC" value="17" enum="Function">
Computes the fractional part of the argument. Translates to [code]fract(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_SATURATE" value="18" enum="Function">
Clamps the value between [code]0.0[/code] and [code]1.0[/code] using [code]min(max(x, 0.0), 1.0)[/code].
</constant>
<constant name="FUNC_NEGATE" value="19" enum="Function">
Negates the [code]x[/code] using [code]-(x)[/code].
</constant>
<constant name="FUNC_ACOSH" value="20" enum="Function">
Returns the arc-hyperbolic-cosine of the parameter. Translates to [code]acosh(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_ASINH" value="21" enum="Function">
Returns the arc-hyperbolic-sine of the parameter. Translates to [code]asinh(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_ATANH" value="22" enum="Function">
Returns the arc-hyperbolic-tangent of the parameter. Translates to [code]atanh(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_DEGREES" value="23" enum="Function">
Convert a quantity in radians to degrees. Translates to [code]degrees(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_EXP2" value="24" enum="Function">
Returns 2 raised by the power of the parameter. Translates to [code]exp2(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_INVERSE_SQRT" value="25" enum="Function">
Returns the inverse of the square root of the parameter. Translates to [code]inversesqrt(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_LOG2" value="26" enum="Function">
Returns the base 2 logarithm of the parameter. Translates to [code]log2(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_RADIANS" value="27" enum="Function">
Convert a quantity in degrees to radians. Translates to [code]radians(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_RECIPROCAL" value="28" enum="Function">
Finds reciprocal value of dividing 1 by [code]x[/code] (i.e. [code]1 / x[/code]).
</constant>
<constant name="FUNC_ROUNDEVEN" value="29" enum="Function">
Finds the nearest even integer to the parameter. Translates to [code]roundEven(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_TRUNC" value="30" enum="Function">
Returns a value equal to the nearest integer to [code]x[/code] whose absolute value is not larger than the absolute value of [code]x[/code]. Translates to [code]trunc(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_ONEMINUS" value="31" enum="Function">
Subtracts scalar [code]x[/code] from 1 (i.e. [code]1 - x[/code]).
</constant>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" version="4.0">
<brief_description>
A floating-point scalar operator to be used within the visual shader graph.
</brief_description>
<description>
Applies [member operator] to two floating-point inputs: [code]a[/code] and [code]b[/code].
</description>
<tutorials>
</tutorials>
......@@ -10,28 +12,39 @@
</methods>
<members>
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0">
An operator to be applied to the inputs. See [enum Operator] for options.
</member>
</members>
<constants>
<constant name="OP_ADD" value="0" enum="Operator">
Sums two numbers using [code]a + b[/code].
</constant>
<constant name="OP_SUB" value="1" enum="Operator">
Subtracts two numbers using [code]a - b[/code].
</constant>
<constant name="OP_MUL" value="2" enum="Operator">
Multiplies two numbers using [code]a * b[/code].
</constant>
<constant name="OP_DIV" value="3" enum="Operator">
Divides two numbers using [code]a / b[/code].
</constant>
<constant name="OP_MOD" value="4" enum="Operator">
Calculates the remainder of two numbers. Translates to [code]mod(a, b)[/code] in the Godot Shader Language.
</constant>
<constant name="OP_POW" value="5" enum="Operator">
Raises the [code]a[/code] to the power of [code]b[/code]. Translates to [code]pow(a, b)[/code] in the Godot Shader Language.
</constant>
<constant name="OP_MAX" value="6" enum="Operator">
Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
</constant>
<constant name="OP_MIN" value="7" enum="Operator">
Returns the lesser of two numbers. Translates to [code]min(a, b)[/code] in the Godot Shader Language.
</constant>
<constant name="OP_ATAN2" value="8" enum="Operator">
Returns the arc-tangent of the parameters. Translates to [code]atan(a, b)[/code] in the Godot Shader Language.
</constant>
<constant name="OP_STEP" value="9" enum="Operator">
Generates a step function by comparing [code]b[/code](x) to [code]a[/code](edge). Returns 0.0 if [code]x[/code] is smaller than [code]edge[/code] and otherwise 1.0. Translates to [code]step(a, b)[/code] in the Godot Shader Language.
</constant>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeIf" inherits="VisualShaderNode" version="4.0">
<brief_description>
Compares two floating-point numbers in order to return a required vector within the visual shader graph.
</brief_description>
<description>
First two ports are scalar floatin-point numbers to compare, third is tolerance comparsion amount and last three ports represents a vectors returned if [code]a == b[/code], [code]a &gt; b[/code] and [code]a &lt; b[/code] respectivly.
</description>
<tutorials>
</tutorials>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeInput" inherits="VisualShaderNode" version="4.0">
<brief_description>
Represents the input shader parameter within the visual shader graph.
</brief_description>
<description>
</description>
......@@ -11,16 +12,19 @@
<return type="String">
</return>
<description>
Returns a translated name of the current constant in the Godot Shader Language. eg. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
</description>
</method>
</methods>
<members>
<member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default="&quot;[None]&quot;">
One of the several input constants in lower-case style like: "vertex"([/code]VERTEX[code]) or "point_size"([code]POINT_SIZE[/code]).
</member>
</members>
<signals>
<signal name="input_type_changed">
<description>
Emitted when input is changed via [member input_name].
</description>
</signal>
</signals>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNode" version="4.0">
<brief_description>
A scalar integer constant to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]int[/code] in the shader language.
</description>
<tutorials>
</tutorials>
......@@ -10,6 +12,7 @@
</methods>
<members>
<member name="constant" type="int" setter="set_constant" getter="get_constant" default="0">
An integer constant which represents a state of this node.
</member>
</members>
<constants>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" version="4.0">
<brief_description>
A scalar integer function to be used within the visual shader graph.
</brief_description>
<description>
Accept an integer scalar ([code]x[/code]) to the input port and transform it according to [member function].
</description>
<tutorials>
</tutorials>
......@@ -10,16 +12,21 @@
</methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="0">
A function to be applied to the scalar. See [enum Function] for options.
</member>
</members>
<constants>
<constant name="FUNC_ABS" value="0" enum="Function">
Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_CLAMP" value="1" enum="Function">
Constrains a parameter between [code]min[/code] and [code]max[/code]. Translates to [code]clamp(x, min, max)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_NEGATE" value="2" enum="Function">
Negates the [code]x[/code] using [code]-(x)[/code].
</constant>
<constant name="FUNC_SIGN" value="3" enum="Function">
Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
</constant>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeIntOp" inherits="VisualShaderNode" version="4.0">
<brief_description>
An integer scalar operator to be used within the visual shader graph.
</brief_description>
<description>
Applies [member operator] to two integer inputs: [code]a[/code] and [code]b[/code].
</description>
<tutorials>
</tutorials>
......@@ -10,22 +12,30 @@
</methods>
<members>
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeIntOp.Operator" default="0">
An operator to be applied to the inputs. See [enum Operator] for options.
</member>
</members>
<constants>
<constant name="OP_ADD" value="0" enum="Operator">
Sums two numbers using [code]a + b[/code].
</constant>
<constant name="OP_SUB" value="1" enum="Operator">
Subtracts two numbers using [code]a - b[/code].
</constant>
<constant name="OP_MUL" value="2" enum="Operator">
Multiplies two numbers using [code]a * b[/code].
</constant>
<constant name="OP_DIV" value="3" enum="Operator">
Divides two numbers using [code]a / b[/code].
</constant>
<constant name="OP_MOD" value="4" enum="Operator">
Calculates the remainder of two numbers using [code]a % b[/code].
</constant>
<constant name="OP_MAX" value="5" enum="Operator">
Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
</constant>
<constant name="OP_MIN" value="6" enum="Operator">
Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
</constant>
</constants>
</class>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment