From 79f3725bdd3ba50f7bc58c75970544220de340a2 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Thu, 7 May 2020 11:19:23 +0200 Subject: [PATCH] Add documentation for the VisualShader nodes (cherry picked from commit fecf79f2870508697b3e45d4d93312d16fe161c5) --- doc/classes/VisualShaderNodeInput.xml | 3 ++ doc/classes/VisualShaderNodeIs.xml | 5 +++ doc/classes/VisualShaderNodeOuterProduct.xml | 2 + doc/classes/VisualShaderNodeOutput.xml | 2 + doc/classes/VisualShaderNodeScalarClamp.xml | 2 + .../VisualShaderNodeScalarDerivativeFunc.xml | 6 +++ doc/classes/VisualShaderNodeScalarInterp.xml | 2 + .../VisualShaderNodeScalarSmoothStep.xml | 3 ++ doc/classes/VisualShaderNodeScalarSwitch.xml | 2 + doc/classes/VisualShaderNodeSwitch.xml | 2 + doc/classes/VisualShaderNodeTexture.xml | 14 +++++++ .../VisualShaderNodeTextureUniform.xml | 10 +++++ ...isualShaderNodeTextureUniformTriplanar.xml | 2 + .../VisualShaderNodeTransformCompose.xml | 2 + .../VisualShaderNodeTransformConstant.xml | 3 ++ .../VisualShaderNodeTransformDecompose.xml | 2 + doc/classes/VisualShaderNodeTransformFunc.xml | 5 +++ doc/classes/VisualShaderNodeTransformMult.xml | 7 ++++ .../VisualShaderNodeTransformUniform.xml | 2 + .../VisualShaderNodeTransformVecMult.xml | 7 ++++ doc/classes/VisualShaderNodeUniform.xml | 3 ++ doc/classes/VisualShaderNodeVec3Constant.xml | 3 ++ doc/classes/VisualShaderNodeVec3Uniform.xml | 2 + doc/classes/VisualShaderNodeVectorClamp.xml | 2 + doc/classes/VisualShaderNodeVectorCompose.xml | 2 + .../VisualShaderNodeVectorDecompose.xml | 2 + .../VisualShaderNodeVectorDerivativeFunc.xml | 6 +++ .../VisualShaderNodeVectorDistance.xml | 3 ++ doc/classes/VisualShaderNodeVectorFunc.xml | 38 +++++++++++++++++++ doc/classes/VisualShaderNodeVectorInterp.xml | 2 + doc/classes/VisualShaderNodeVectorLen.xml | 2 + doc/classes/VisualShaderNodeVectorOp.xml | 15 ++++++++ doc/classes/VisualShaderNodeVectorRefract.xml | 2 + .../VisualShaderNodeVectorScalarMix.xml | 2 + ...VisualShaderNodeVectorScalarSmoothStep.xml | 3 ++ .../VisualShaderNodeVectorScalarStep.xml | 3 ++ .../VisualShaderNodeVectorSmoothStep.xml | 3 ++ 37 files changed, 176 insertions(+) diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index 47e8d12f289..adb4fda592c 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -3,8 +3,10 @@ + Gives access to input variables (built-ins) available for the shader. See the shading reference for the list of available built-ins for each shader type (check [code]Tutorials[/code] section for link). + https://docs.godotengine.org/en/stable/tutorials/shading/shading_reference/index.html @@ -16,6 +18,7 @@ + One of the several input constants in lower-case style like: "vertex"([code]VERTEX[/code]) or "point_size"([code]POINT_SIZE[/code]). diff --git a/doc/classes/VisualShaderNodeIs.xml b/doc/classes/VisualShaderNodeIs.xml index c6f395dddbe..9165564792f 100644 --- a/doc/classes/VisualShaderNodeIs.xml +++ b/doc/classes/VisualShaderNodeIs.xml @@ -1,8 +1,10 @@ + A boolean comparison operator to be used within the visual shader graph. + Returns the boolean result of the comparison between [code]INF[/code] or [code]NaN[/code] and a scalar parameter. @@ -10,12 +12,15 @@ + The comparison function. See [enum Function] for options. + Comparison with [code]INF[/code] (Infinity). + Comparison with [code]NaN[/code] (Not a Number; denotes invalid numeric results, e.g. division by zero). diff --git a/doc/classes/VisualShaderNodeOuterProduct.xml b/doc/classes/VisualShaderNodeOuterProduct.xml index 653f68dbf57..aa5add0f5df 100644 --- a/doc/classes/VisualShaderNodeOuterProduct.xml +++ b/doc/classes/VisualShaderNodeOuterProduct.xml @@ -1,8 +1,10 @@ + Calculates an outer product of two vectors within the visual shader graph. + [code]OuterProduct[/code] treats the first parameter [code]c[/code] as a column vector (matrix with one column) and the second parameter [code]r[/code] as a row vector (matrix with one row) and does a linear algebraic matrix multiply [code]c * r[/code], yielding a matrix whose number of rows is the number of components in [code]c[/code] and whose number of columns is the number of components in [code]r[/code]. diff --git a/doc/classes/VisualShaderNodeOutput.xml b/doc/classes/VisualShaderNodeOutput.xml index 0f013877de1..c60622c9c17 100644 --- a/doc/classes/VisualShaderNodeOutput.xml +++ b/doc/classes/VisualShaderNodeOutput.xml @@ -1,8 +1,10 @@ + Represents the output shader parameters within the visual shader graph. + This visual shader node is present in all shader graphs in form of "Output" block with mutliple output value ports. diff --git a/doc/classes/VisualShaderNodeScalarClamp.xml b/doc/classes/VisualShaderNodeScalarClamp.xml index 8b5d85b4307..18ed1192635 100644 --- a/doc/classes/VisualShaderNodeScalarClamp.xml +++ b/doc/classes/VisualShaderNodeScalarClamp.xml @@ -1,8 +1,10 @@ + Clamps a scalar value within the visual shader graph. + Constrains a value to lie between [code]min[/code] and [code]max[/code] values. diff --git a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml index 55b3b369640..5f301d3501a 100644 --- a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml @@ -1,8 +1,10 @@ + Calculates a scalar derivative within the visual shader graph. + This node is only available in [code]Fragment[/code] and [code]Light[/code] visual shaders. @@ -10,14 +12,18 @@ + The derivative type. See [enum Function] for options. + Sum of absolute derivative in [code]x[/code] and [code]y[/code]. + Derivative in [code]x[/code] using local differencing. + Derivative in [code]y[/code] using local differencing. diff --git a/doc/classes/VisualShaderNodeScalarInterp.xml b/doc/classes/VisualShaderNodeScalarInterp.xml index 09b842f08e9..6d8aa21014d 100644 --- a/doc/classes/VisualShaderNodeScalarInterp.xml +++ b/doc/classes/VisualShaderNodeScalarInterp.xml @@ -1,8 +1,10 @@ + Linearly interpolates between two scalars within the visual shader graph. + Translates to [code]mix(a, b, weight)[/code] in the shader language. diff --git a/doc/classes/VisualShaderNodeScalarSmoothStep.xml b/doc/classes/VisualShaderNodeScalarSmoothStep.xml index 07a9b9bae06..2a9ef36f5f9 100644 --- a/doc/classes/VisualShaderNodeScalarSmoothStep.xml +++ b/doc/classes/VisualShaderNodeScalarSmoothStep.xml @@ -1,8 +1,11 @@ + Calculates a scalar SmoothStep function within the visual shader graph. + Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language. + Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials. diff --git a/doc/classes/VisualShaderNodeScalarSwitch.xml b/doc/classes/VisualShaderNodeScalarSwitch.xml index 2828f151dfe..812395a5849 100644 --- a/doc/classes/VisualShaderNodeScalarSwitch.xml +++ b/doc/classes/VisualShaderNodeScalarSwitch.xml @@ -1,8 +1,10 @@ + A boolean/scalar function for use within the visual shader graph. + Returns an associated scalar if the provided boolean value is [code]true[/code] or [code]false[/code]. diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml index 36f0f565166..af58fe4dc17 100644 --- a/doc/classes/VisualShaderNodeSwitch.xml +++ b/doc/classes/VisualShaderNodeSwitch.xml @@ -1,8 +1,10 @@ + A boolean/vector function for use within the visual shader graph. + Returns an associated vector if the provided boolean value is [code]true[/code] or [code]false[/code]. diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml index 8a97d8bfb6a..3c7aa74a566 100644 --- a/doc/classes/VisualShaderNodeTexture.xml +++ b/doc/classes/VisualShaderNodeTexture.xml @@ -1,8 +1,10 @@ + Performs a texture lookup within the visual shader graph. + Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from. @@ -10,30 +12,42 @@ + Determines the source for the lookup. See [enum Source] for options. + The source texture, if needed for the selected [member source]. + Specifies the type of the texture if [member source] is set to [constant SOURCE_TEXTURE]. See [enum TextureType] for options. + Use the texture given as an argument for this function. + Use the current viewport's texture as the source. + Use the texture from this shader's texture built-in (e.g. a texture of a [Sprite]). + Use the texture from this shader's normal map built-in. + Use the depth texture available for this shader. + Use the texture provided in the input port for this function. + No hints are added to the uniform declaration. + Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion. + Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml index ffb3e935618..eab4990b6ec 100644 --- a/doc/classes/VisualShaderNodeTextureUniform.xml +++ b/doc/classes/VisualShaderNodeTextureUniform.xml @@ -1,8 +1,10 @@ + Performs a uniform texture lookup within the visual shader graph. + Performs a lookup operation on the texture provided as a uniform for the shader. @@ -10,22 +12,30 @@ + Sets the default color if no texture is assigned to the uniform. + Defines the type of data provided by the source texture. See [enum TextureType] for options. + No hints are added to the uniform declaration. + Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion. + Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. + Adds [code]hint_aniso[/code] as hint to the uniform declaration to use for a flowmap. + Defaults to white color. + Defaults to black color. diff --git a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml index 9e14501fb8a..1ffc7c99330 100644 --- a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml +++ b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml @@ -1,8 +1,10 @@ + Performs a uniform texture lookup with triplanar within the visual shader graph. + Performs a lookup operation on the texture provided as a uniform for the shader, with support for triplanar mapping. diff --git a/doc/classes/VisualShaderNodeTransformCompose.xml b/doc/classes/VisualShaderNodeTransformCompose.xml index 42d3e06c0db..f23dcada823 100644 --- a/doc/classes/VisualShaderNodeTransformCompose.xml +++ b/doc/classes/VisualShaderNodeTransformCompose.xml @@ -1,8 +1,10 @@ + Composes a [Transform] from four [Vector3]s within the visual shader graph. + Creates a 4x4 transform matrix using four vectors of type [code]vec3[/code]. Each vector is one row in the matrix and the last column is a [code]vec4(0, 0, 0, 1)[/code]. diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml index a90856163d1..62a71f667d5 100644 --- a/doc/classes/VisualShaderNodeTransformConstant.xml +++ b/doc/classes/VisualShaderNodeTransformConstant.xml @@ -1,8 +1,10 @@ + A [Transform] constant for use within the visual shader graph. + A constant [Transform], which can be used as an input node. @@ -10,6 +12,7 @@ + A [Transform] constant which represents the state of this node. diff --git a/doc/classes/VisualShaderNodeTransformDecompose.xml b/doc/classes/VisualShaderNodeTransformDecompose.xml index a2020b32fca..f3716bc4f17 100644 --- a/doc/classes/VisualShaderNodeTransformDecompose.xml +++ b/doc/classes/VisualShaderNodeTransformDecompose.xml @@ -1,8 +1,10 @@ + Decomposes a [Transform] into four [Vector3]s within the visual shader graph. + Takes a 4x4 transform matrix and decomposes it into four [code]vec3[/code] values, one from each row of the matrix. diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml index 9491c091e77..5171115d7b3 100644 --- a/doc/classes/VisualShaderNodeTransformFunc.xml +++ b/doc/classes/VisualShaderNodeTransformFunc.xml @@ -1,8 +1,10 @@ + Computes a [Transform] function within the visual shader graph. + Computes an inverse or transpose function on the provided [Transform]. @@ -10,12 +12,15 @@ + The function to be computed. See [enum Function] for options. + Perform the inverse operation on the [Transform] matrix. + Perform the transpose operation on the [Transform] matrix. diff --git a/doc/classes/VisualShaderNodeTransformMult.xml b/doc/classes/VisualShaderNodeTransformMult.xml index db4294af647..7d42bd0e5b0 100644 --- a/doc/classes/VisualShaderNodeTransformMult.xml +++ b/doc/classes/VisualShaderNodeTransformMult.xml @@ -1,8 +1,10 @@ + Multiplies [Transform] by [Transform] within the visual shader graph. + A multiplication operation on two transforms (4x4 matrices), with support for different multiplication operators. @@ -10,16 +12,21 @@ + The multiplication type to be performed on the transforms. See [enum Operator] for options. + Multiplies transform [code]a[/code] by the transform [code]b[/code]. + Multiplies transform [code]b[/code] by the transform [code]a[/code]. + Performs a component-wise multiplication of transform [code]a[/code] by the transform [code]b[/code]. + Performs a component-wise multiplication of transform [code]b[/code] by the transform [code]a[/code]. diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml index 08b988e03fe..05b4d90ab2f 100644 --- a/doc/classes/VisualShaderNodeTransformUniform.xml +++ b/doc/classes/VisualShaderNodeTransformUniform.xml @@ -1,8 +1,10 @@ + A [Transform] uniform for use within the visual shader graph. + Translated to [code]uniform mat4[/code] in the shader language. diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml index 323943e52fb..93a45ae14ef 100644 --- a/doc/classes/VisualShaderNodeTransformVecMult.xml +++ b/doc/classes/VisualShaderNodeTransformVecMult.xml @@ -1,8 +1,10 @@ + Multiplies a [Transform] and a [Vector3] within the visual shader graph. + A multiplication operation on a transform (4x4 matrix) and a vector, with support for different multiplication operators. @@ -10,16 +12,21 @@ + The multiplication type to be performed. See [enum Operator] for options. + Multiplies transform [code]a[/code] by the vector [code]b[/code]. + Multiplies vector [code]b[/code] by the transform [code]a[/code]. + Multiplies transform [code]a[/code] by the vector [code]b[/code], skipping the last row and column of the transform. + Multiplies vector [code]b[/code] by the transform [code]a[/code], skipping the last row and column of the transform. diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml index 0c822a0d89c..91bc12f912e 100644 --- a/doc/classes/VisualShaderNodeUniform.xml +++ b/doc/classes/VisualShaderNodeUniform.xml @@ -1,8 +1,10 @@ + A base type for the uniforms within the visual shader graph. + A uniform represents a variable in the shader which is set externally, i.e. from the [ShaderMaterial]. Uniforms are exposed as properties in the [ShaderMaterial] and can be assigned from the inspector or from a script. @@ -10,6 +12,7 @@ + Name of the uniform, by which it can be accessed through the [ShaderMaterial] properties. diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml index 5072d085f79..80b922d0c64 100644 --- a/doc/classes/VisualShaderNodeVec3Constant.xml +++ b/doc/classes/VisualShaderNodeVec3Constant.xml @@ -1,8 +1,10 @@ + A [Vector3] constant to be used within the visual shader graph. + A constant [Vector3], which can be used as an input node. @@ -10,6 +12,7 @@ + A [Vector3] constant which represents the state of this node. diff --git a/doc/classes/VisualShaderNodeVec3Uniform.xml b/doc/classes/VisualShaderNodeVec3Uniform.xml index 424ba2c45eb..85bd2a010ae 100644 --- a/doc/classes/VisualShaderNodeVec3Uniform.xml +++ b/doc/classes/VisualShaderNodeVec3Uniform.xml @@ -1,8 +1,10 @@ + A [Vector3] uniform to be used within the visual shader graph. + Translated to [code]uniform vec3[/code] in the shader language. diff --git a/doc/classes/VisualShaderNodeVectorClamp.xml b/doc/classes/VisualShaderNodeVectorClamp.xml index 7c60c104ca7..12333e38306 100644 --- a/doc/classes/VisualShaderNodeVectorClamp.xml +++ b/doc/classes/VisualShaderNodeVectorClamp.xml @@ -1,8 +1,10 @@ + Clamps a vector value within the visual shader graph. + Constrains a value to lie between [code]min[/code] and [code]max[/code] values. The operation is performed on each component of the vector individually. diff --git a/doc/classes/VisualShaderNodeVectorCompose.xml b/doc/classes/VisualShaderNodeVectorCompose.xml index 1a641820c7e..8621f7ceb22 100644 --- a/doc/classes/VisualShaderNodeVectorCompose.xml +++ b/doc/classes/VisualShaderNodeVectorCompose.xml @@ -1,8 +1,10 @@ + Composes a [Vector3] from three scalars within the visual shader graph. + Creates a [code]vec3[/code] using three scalar values that can be provided from separate inputs. diff --git a/doc/classes/VisualShaderNodeVectorDecompose.xml b/doc/classes/VisualShaderNodeVectorDecompose.xml index 361014c3f50..8547fc6c826 100644 --- a/doc/classes/VisualShaderNodeVectorDecompose.xml +++ b/doc/classes/VisualShaderNodeVectorDecompose.xml @@ -1,8 +1,10 @@ + Decomposes a [Vector3] into three scalars within the visual shader graph. + Takes a [code]vec3[/code] and decomposes it into three scalar values that can be used as separate inputs. diff --git a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml index 4e2680be1ab..854a7137c5f 100644 --- a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml @@ -1,8 +1,10 @@ + Calculates a vector derivative within the visual shader graph. + This node is only available in [code]Fragment[/code] and [code]Light[/code] visual shaders. @@ -10,14 +12,18 @@ + A derivative type. See [enum Function] for options. + Sum of absolute derivative in [code]x[/code] and [code]y[/code]. + Derivative in [code]x[/code] using local differencing. + Derivative in [code]y[/code] using local differencing. diff --git a/doc/classes/VisualShaderNodeVectorDistance.xml b/doc/classes/VisualShaderNodeVectorDistance.xml index 2bd20f98fb8..edb9132b0bf 100644 --- a/doc/classes/VisualShaderNodeVectorDistance.xml +++ b/doc/classes/VisualShaderNodeVectorDistance.xml @@ -1,8 +1,11 @@ + Returns the distance between two points. To be used within the visual shader graph. + Calculates distance from point represented by vector [code]p0[/code] to vector [code]p1[/code]. + Translated to [code]distance(p0, p1)[/code] in the shader language. diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml index 2ab7d2d7b76..e01591364c8 100644 --- a/doc/classes/VisualShaderNodeVectorFunc.xml +++ b/doc/classes/VisualShaderNodeVectorFunc.xml @@ -1,8 +1,10 @@ + A vector function to be used within the visual shader graph. + A visual shader node able to perform different functions using vectors. @@ -10,78 +12,114 @@ + The function to be performed. See [enum Function] for options. + Normalizes the vector so that it has a length of [code]1[/code] but points in the same direction. + Clamps the value between [code]0.0[/code] and [code]1.0[/code]. + Returns the opposite value of the parameter. + Returns [code]1/vector[/code]. + Converts RGB vector to HSV equivalent. + Converts HSV vector to RGB equivalent. + Returns the absolute value of the parameter. + Returns the arc-cosine of the parameter. + Returns the inverse hyperbolic cosine of the parameter. + Returns the arc-sine of the parameter. + Returns the inverse hyperbolic sine of the parameter. + Returns the arc-tangent of the parameter. + Returns the inverse hyperbolic tangent of the parameter. + Finds the nearest integer that is greater than or equal to the parameter. + Returns the cosine of the parameter. + Returns the hyperbolic cosine of the parameter. + Converts a quantity in radians to degrees. + Base-e Exponential. + Base-2 Exponential. + Finds the nearest integer less than or equal to the parameter. + Computes the fractional part of the argument. + Returns the inverse of the square root of the parameter. + Natural logarithm. + Base-2 logarithm. + Converts a quantity in degrees to radians. + Finds the nearest integer to the parameter. + Finds the nearest even integer to the parameter. + Extracts the sign of the parameter, i.e. returns [code]-1[/code] if the parameter is negative, [code]1[/code] if it's positive and [code]0[/code] otherwise. + Returns the sine of the parameter. + Returns the hyperbolic sine of the parameter. + Returns the square root of the parameter. + Returns the tangent of the parameter. + Returns the hyperbolic tangent of the parameter. + Returns a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter. + Returns [code]1.0 - vector[/code]. diff --git a/doc/classes/VisualShaderNodeVectorInterp.xml b/doc/classes/VisualShaderNodeVectorInterp.xml index 721bafa6937..9fd31246811 100644 --- a/doc/classes/VisualShaderNodeVectorInterp.xml +++ b/doc/classes/VisualShaderNodeVectorInterp.xml @@ -1,8 +1,10 @@ + Linearly interpolates between two vectors within the visual shader graph. + Translates to [code]mix(a, b, weight)[/code] in the shader language, where [code]weight[/code] is a [Vector3] with weights for each component. diff --git a/doc/classes/VisualShaderNodeVectorLen.xml b/doc/classes/VisualShaderNodeVectorLen.xml index 821358c7dfb..cf0ae05fbe5 100644 --- a/doc/classes/VisualShaderNodeVectorLen.xml +++ b/doc/classes/VisualShaderNodeVectorLen.xml @@ -1,8 +1,10 @@ + Returns the length of a [Vector3] within the visual shader graph. + Translated to [code]length(p0)[/code] in the shader language. diff --git a/doc/classes/VisualShaderNodeVectorOp.xml b/doc/classes/VisualShaderNodeVectorOp.xml index 191dd79c281..fca4b833d48 100644 --- a/doc/classes/VisualShaderNodeVectorOp.xml +++ b/doc/classes/VisualShaderNodeVectorOp.xml @@ -1,8 +1,10 @@ + A vector operator to be used within the visual shader graph. + A visual shader node for use of vector operators. Operates on vector [code]a[/code] and vector [code]b[/code]. @@ -10,32 +12,45 @@ + The operator to be used. See [enum Operator] for options. + Adds two vectors. + Subtracts a vector from a vector. + Multiplies two vectors. + Divides vector by vector. + Returns the remainder of the two vectors. + Returns the value of the first parameter raised to the power of the second, for each component of the vectors. + Returns the greater of two values, for each component of the vectors. + Returns the lesser of two values, for each component of the vectors. + Calculates the cross product of two vectors. + Returns the arc-tangent of the parameters. + Returns the vector that points in the direction of reflection. [code]a[/code] is incident vector and [code]b[/code] is the normal vector. + Vector step operator. Returns [code]0.0[/code] if [code]a[/code] is smaller than [code]b[/code] and [code]1.0[/code] otherwise. diff --git a/doc/classes/VisualShaderNodeVectorRefract.xml b/doc/classes/VisualShaderNodeVectorRefract.xml index 14ceafe6def..3c3b21ca52b 100644 --- a/doc/classes/VisualShaderNodeVectorRefract.xml +++ b/doc/classes/VisualShaderNodeVectorRefract.xml @@ -1,8 +1,10 @@ + Returns the [Vector3] that points in the direction of refraction. For use within the visual shader graph. + Translated to [code]refract(I, N, eta)[/code] in the shader language, where [code]I[/code] is the incident vector, [code]N[/code] is the normal vector and [code]eta[/code] is the ratio of the indicies of the refraction. diff --git a/doc/classes/VisualShaderNodeVectorScalarMix.xml b/doc/classes/VisualShaderNodeVectorScalarMix.xml index cebb7af39ef..f5a1d8f5aba 100644 --- a/doc/classes/VisualShaderNodeVectorScalarMix.xml +++ b/doc/classes/VisualShaderNodeVectorScalarMix.xml @@ -1,8 +1,10 @@ + Linearly interpolates between two vectors using a scalar. For use within the visual shader graph. + Translates to [code]mix(a, b, weight)[/code] in the shader language, where [code]a[/code] and [code]b[/code] are vectors and [code]weight[/code] is a scalar. diff --git a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml b/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml index 3a9c2799535..43fa12a8e38 100644 --- a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml +++ b/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml @@ -1,8 +1,11 @@ + Calculates a vector SmoothStep function using scalar within the visual shader graph. + Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language, where [code]x[/code] is a scalar. + Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials. diff --git a/doc/classes/VisualShaderNodeVectorScalarStep.xml b/doc/classes/VisualShaderNodeVectorScalarStep.xml index 8219c87a626..2a8063162b0 100644 --- a/doc/classes/VisualShaderNodeVectorScalarStep.xml +++ b/doc/classes/VisualShaderNodeVectorScalarStep.xml @@ -1,8 +1,11 @@ + Calculates a vector Step function within the visual shader graph. + Translates to [code]step(edge, x)[/code] in the shader language. + Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge[/code] and [code]1.0[/code] otherwise. diff --git a/doc/classes/VisualShaderNodeVectorSmoothStep.xml b/doc/classes/VisualShaderNodeVectorSmoothStep.xml index ec9674d84c4..cc1791795d6 100644 --- a/doc/classes/VisualShaderNodeVectorSmoothStep.xml +++ b/doc/classes/VisualShaderNodeVectorSmoothStep.xml @@ -1,8 +1,11 @@ + Calculates a vector SmoothStep function within the visual shader graph. + Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language, where [code]x[/code] is a vector. + Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.