Skip to content

Commit

Permalink
Use GDShader when referring to the Godot Shader Language
Browse files Browse the repository at this point in the history
  • Loading branch information
DeeJayLSP committed Sep 22, 2024
1 parent e4e024a commit 8144edb
Show file tree
Hide file tree
Showing 42 changed files with 92 additions and 92 deletions.
4 changes: 2 additions & 2 deletions doc/classes/Shader.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Shader" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A shader implemented in the Godot shading language.
A shader implemented in the GDShader language.
</brief_description>
<description>
A custom shader program implemented in the Godot shading language, saved with the [code].gdshader[/code] extension.
A custom shader program implemented in Godot's shading language, GDShader, saved with the [code].gdshader[/code] extension.
This class is used by a [ShaderMaterial] and allows you to write your own custom behavior for rendering visual items or updating particle information. For a detailed explanation and usage, please see the tutorials linked below.
</description>
<tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeBooleanConstant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</brief_description>
<description>
Has only one output port and no inputs.
Translated to [code skip-lint]bool[/code] in the shader language.
Translated to [code skip-lint]bool[/code] in the GDShader language.
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeBooleanParameter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A boolean parameter to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform bool[/code] in the shader language.
Translated to [code]uniform bool[/code] in the GDShader language.
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeColorConstant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</brief_description>
<description>
Has two output ports representing RGB and alpha channels of [Color].
Translated to [code]vec3 rgb[/code] and [code]float alpha[/code] in the shader language.
Translated to [code]vec3 rgb[/code] and [code]float alpha[/code] in the GDShader language.
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeColorParameter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A [Color] parameter to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform vec4[/code] in the shader language.
Translated to [code]uniform vec4[/code] in the GDShader language.
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeCubemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A [Cubemap] sampling node to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]texture(cubemap, vec3)[/code] in the shader language. Returns a color vector and alpha channel as scalar.
Translated to [code]texture(cubemap, vec3)[/code] in the GDShader language. Returns a color vector and alpha channel as scalar.
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeCubemapParameter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A [Cubemap] parameter node to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform samplerCube[/code] in the shader language. The output value can be used as port for [VisualShaderNodeCubemap].
Translated to [code]uniform samplerCube[/code] in the GDShader language. The output value can be used as port for [VisualShaderNodeCubemap].
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeDeterminant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Calculates the determinant of a [Transform3D] within the visual shader graph.
</brief_description>
<description>
Translates to [code]determinant(x)[/code] in the shader language.
Translates to [code]determinant(x)[/code] in the GDShader language.
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeDotProduct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Calculates a dot product of two vectors within the visual shader graph.
</brief_description>
<description>
Translates to [code]dot(a, b)[/code] in the shader language.
Translates to [code]dot(a, b)[/code] in the GDShader language.
</description>
<tutorials>
</tutorials>
Expand Down
6 changes: 3 additions & 3 deletions doc/classes/VisualShaderNodeExpression.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeExpression" inherits="VisualShaderNodeGroupBase" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A custom visual shader graph expression written in Godot Shading Language.
A custom visual shader graph expression written in the GDShader language.
</brief_description>
<description>
Custom Godot Shading Language expression, with a custom number of input and output ports.
Custom GDShader expression, with a custom number of input and output ports.
The provided code is directly injected into the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), so it cannot be used to declare functions, varyings, uniforms, or global constants. See [VisualShaderNodeGlobalExpression] for such global definitions.
</description>
<tutorials>
</tutorials>
<members>
<member name="expression" type="String" setter="set_expression" getter="get_expression" default="&quot;&quot;">
An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), and thus cannot be used to declare functions, varyings, uniforms, or global constants.
An expression in the GDShader language, which will be injected at the start of the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), and thus cannot be used to declare functions, varyings, uniforms, or global constants.
</member>
</members>
</class>
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeFaceForward.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Returns the vector that points in the same direction as a reference vector within the visual shader graph.
</brief_description>
<description>
Translates to [code]faceforward(N, I, Nref)[/code] in the shader language. The function has three vector parameters: [code]N[/code], the vector to orient, [code]I[/code], the incident vector, and [code]Nref[/code], the reference vector. If the dot product of [code]I[/code] and [code]Nref[/code] is smaller than zero the return value is [code]N[/code]. Otherwise, [code]-N[/code] is returned.
Translates to [code]faceforward(N, I, Nref)[/code] in the GDShader language. The function has three vector parameters: [code]N[/code], the vector to orient, [code]I[/code], the incident vector, and [code]Nref[/code], the reference vector. If the dot product of [code]I[/code] and [code]Nref[/code] is smaller than zero the return value is [code]N[/code]. Otherwise, [code]-N[/code] is returned.
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeFloatConstant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A scalar floating-point constant to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code skip-lint]float[/code] in the shader language.
Translated to [code skip-lint]float[/code] in the GDShader language.
</description>
<tutorials>
</tutorials>
Expand Down
56 changes: 28 additions & 28 deletions doc/classes/VisualShaderNodeFloatFunc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,58 +15,58 @@
</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.
Returns the sine of the parameter. Translates to [code]sin(x)[/code] in the GDShader 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.
Returns the cosine of the parameter. Translates to [code]cos(x)[/code] in the GDShader 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.
Returns the tangent of the parameter. Translates to [code]tan(x)[/code] in the GDShader 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.
Returns the arc-sine of the parameter. Translates to [code]asin(x)[/code] in the GDShader 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.
Returns the arc-cosine of the parameter. Translates to [code]acos(x)[/code] in the GDShader 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.
Returns the arc-tangent of the parameter. Translates to [code]atan(x)[/code] in the GDShader 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.
Returns the hyperbolic sine of the parameter. Translates to [code]sinh(x)[/code] in the GDShader 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.
Returns the hyperbolic cosine of the parameter. Translates to [code]cosh(x)[/code] in the GDShader 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.
Returns the hyperbolic tangent of the parameter. Translates to [code]tanh(x)[/code] in the GDShader 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.
Returns the natural logarithm of the parameter. Translates to [code]log(x)[/code] in the GDShader 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.
Returns the natural exponentiation of the parameter. Translates to [code]exp(x)[/code] in the GDShader 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.
Returns the square root of the parameter. Translates to [code]sqrt(x)[/code] in the GDShader 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.
Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the GDShader 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.
Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the GDShader 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.
Finds the nearest integer less than or equal to the parameter. Translates to [code]floor(x)[/code] in the GDShader 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.
Finds the nearest integer to the parameter. Translates to [code]round(x)[/code] in the GDShader 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.
Finds the nearest integer that is greater than or equal to the parameter. Translates to [code]ceil(x)[/code] in the GDShader language.
</constant>
<constant name="FUNC_FRACT" value="17" enum="Function">
Computes the fractional part of the argument. Translates to [code]fract(x)[/code] in the Godot Shader Language.
Computes the fractional part of the argument. Translates to [code]fract(x)[/code] in the GDShader 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].
Expand All @@ -75,37 +75,37 @@
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.
Returns the arc-hyperbolic-cosine of the parameter. Translates to [code]acosh(x)[/code] in the GDShader 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.
Returns the arc-hyperbolic-sine of the parameter. Translates to [code]asinh(x)[/code] in the GDShader 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.
Returns the arc-hyperbolic-tangent of the parameter. Translates to [code]atanh(x)[/code] in the GDShader 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.
Convert a quantity in radians to degrees. Translates to [code]degrees(x)[/code] in the GDShader 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.
Returns 2 raised by the power of the parameter. Translates to [code]exp2(x)[/code] in the GDShader 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.
Returns the inverse of the square root of the parameter. Translates to [code]inversesqrt(x)[/code] in the GDShader 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.
Returns the base 2 logarithm of the parameter. Translates to [code]log2(x)[/code] in the GDShader 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.
Convert a quantity in degrees to radians. Translates to [code]radians(x)[/code] in the GDShader 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.
Finds the nearest even integer to the parameter. Translates to [code]roundEven(x)[/code] in the GDShader 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.
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 GDShader language.
</constant>
<constant name="FUNC_ONEMINUS" value="31" enum="Function">
Subtracts scalar [code]x[/code] from 1 (i.e. [code]1 - x[/code]).
Expand Down
12 changes: 6 additions & 6 deletions doc/classes/VisualShaderNodeFloatOp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@
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.
Calculates the remainder of two numbers. Translates to [code]mod(a, b)[/code] in the GDShader 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.
Raises the [code]a[/code] to the power of [code]b[/code]. Translates to [code]pow(a, b)[/code] in the GDShader 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.
Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the GDShader 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.
Returns the lesser of two numbers. Translates to [code]min(a, b)[/code] in the GDShader 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.
Returns the arc-tangent of the parameters. Translates to [code]atan(a, b)[/code] in the GDShader 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.
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 GDShader language.
</constant>
<constant name="OP_ENUM_SIZE" value="10" enum="Operator">
Represents the size of the [enum Operator] enum.
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeFloatParameter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A scalar float parameter to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform float[/code] in the shader language.
Translated to [code]uniform float[/code] in the GDShader language.
</description>
<tutorials>
</tutorials>
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/VisualShaderNodeGlobalExpression.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeGlobalExpression" inherits="VisualShaderNodeExpression" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A custom global visual shader graph expression written in Godot Shading Language.
A custom global visual shader graph expression written in the GDShader language.
</brief_description>
<description>
Custom Godot Shader Language expression, which is placed on top of the generated shader. You can place various function definitions inside to call later in [VisualShaderNodeExpression]s (which are injected in the main shader functions). You can also declare varyings, uniforms and global constants.
Custom GDShader expression, which is placed on top of the generated shader. You can place various function definitions inside to call later in [VisualShaderNodeExpression]s (which are injected in the main shader functions). You can also declare varyings, uniforms and global constants.
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeInput.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<method name="get_input_real_name" qualifiers="const">
<return type="String" />
<description>
Returns a translated name of the current constant in the Godot Shader Language. E.g. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
Returns a translated name of the current constant in the GDShader language. E.g. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
</description>
</method>
</methods>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeIntConstant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A scalar integer constant to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code skip-lint]int[/code] in the shader language.
Translated to [code skip-lint]int[/code] in the GDShader language.
</description>
<tutorials>
</tutorials>
Expand Down
Loading

0 comments on commit 8144edb

Please sign in to comment.