mirror of
https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git
synced 2025-01-05 00:53:36 +08:00
Documentation updated
This commit is contained in:
parent
3cf0e2d38a
commit
dc049b857b
@ -30,6 +30,11 @@ For example if you want to rotate UV in your **_.gdshader_** file, you can use `
|
||||
|
||||
<h2>Maths nodes</h2>
|
||||
|
||||
<h3> Scalar</h3>
|
||||
|
||||
<h4><a href="/documentation/Nodes/Maths/Scalar/SmoothMax.md">  SmoothMax node</a></h4>
|
||||
<h4><a href="/documentation/Nodes/Maths/Scalar/SmoothMin.md">  SmoothMin node</a></h4>
|
||||
|
||||
<h3> Vector</h3>
|
||||
|
||||
<h3>  Distance</h3>
|
||||
|
29
documentation/Nodes/Maths/Scalar/SmoothMax.md
Normal file
29
documentation/Nodes/Maths/Scalar/SmoothMax.md
Normal file
@ -0,0 +1,29 @@
|
||||
# SmoothMax node
|
||||
Returns the maximum value between A and B, but smooths out the intersections of A and B based on T. T is the smoothing value if passed 0 function will act as a standard max(), if negative value is passed it will act as <b><i>[SmoothMin node](/documentation/Nodes/Maths/Scalar/SmoothMin.md)</b></i>.
|
||||
<hr>
|
||||
|
||||
**Inputs**
|
||||
|Name|Type|Binding|Description|
|
||||
|---|---|---|---|
|
||||
|a|float|none|Input A|
|
||||
|b|float|none|Input B|
|
||||
|t|float|none|Smoothing input|
|
||||
|
||||
**Outputs**
|
||||
|Name|Type|Binding|Description|
|
||||
|---|---|---|---|
|
||||
|op|float|None|Smooth maximum between A and B|
|
||||
|
||||
**ShaderInc location**
|
||||
<br>`res://addons/ShaderLib/Maths/Scalar/SmoothMax.gdshaderinc`
|
||||
|
||||
**Method signature**
|
||||
<br>`float smoothmax(float a, float b, float t)`
|
||||
|
||||
**Parameters**
|
||||
|Name|Type|Description|
|
||||
|---|---|---|
|
||||
|a|float|Input A|
|
||||
|b|float|Input B|
|
||||
|t|float|Smoothing input|
|
||||
___
|
29
documentation/Nodes/Maths/Scalar/SmoothMin.md
Normal file
29
documentation/Nodes/Maths/Scalar/SmoothMin.md
Normal file
@ -0,0 +1,29 @@
|
||||
# SmoothMin node
|
||||
Returns the minimum value between A and B, but smooths out the intersections of A and B based on T. T is the smoothing value if passed 0 function will act as a standard min(), if negative value is passed it will act as <b><i>[SmoothMax node](/documentation/Nodes/Maths/Scalar/SmoothMax.md)</b></i>.
|
||||
<hr>
|
||||
|
||||
**Inputs**
|
||||
|Name|Type|Binding|Description|
|
||||
|---|---|---|---|
|
||||
|a|float|none|Input A|
|
||||
|b|float|none|Input B|
|
||||
|t|float|none|Smoothing input|
|
||||
|
||||
**Outputs**
|
||||
|Name|Type|Binding|Description|
|
||||
|---|---|---|---|
|
||||
|op|float|None|Smooth minimum between A and B|
|
||||
|
||||
**ShaderInc location**
|
||||
<br>`res://addons/ShaderLib/Maths/Scalar/SmoothMin.gdshaderinc`
|
||||
|
||||
**Method signature**
|
||||
<br>`float smoothmin(float a, float b, float t)`
|
||||
|
||||
**Parameters**
|
||||
|Name|Type|Description|
|
||||
|---|---|---|
|
||||
|a|float|Input A|
|
||||
|b|float|Input B|
|
||||
|t|float|Smoothing input|
|
||||
___
|
@ -17,4 +17,23 @@ Projects <i><b>vector A</b></i> onto <i><b>vector B</b></i>.
|
||||
|Name|Type|Binding|Description|
|
||||
|---|---|---|---|
|
||||
|vector|vector3|None|Output vector|
|
||||
|
||||
**ShaderInc location**
|
||||
<br>`res://addons/ShaderLib/Maths/Vector/Project.gdshaderinc`
|
||||
|
||||
**Method signature**
|
||||
<br>`vec2 project_2d(vec2 a, vec2 b)`
|
||||
<br>`vec3 project_3d(vec3 a, vec3 b)`
|
||||
|
||||
**Parameters for 2D**
|
||||
|Name|Type|Description|
|
||||
|---|---|---|
|
||||
|a|vec2|Vector A|
|
||||
|b|vec2|Vector B|
|
||||
|
||||
**Parameters for 3D**
|
||||
|Name|Type|Description|
|
||||
|---|---|---|
|
||||
|a|vec3|Vector A|
|
||||
|b|vec3|Vector B|
|
||||
___
|
@ -2,19 +2,26 @@
|
||||
Projects a vector onto a plane defined by a normal orthogonal to the plane.
|
||||
<hr>
|
||||
|
||||
**Controls**
|
||||
|Options|Description|
|
||||
|---|---|
|
||||
|Vector2, Vector3|Vector type to use for calculation|
|
||||
|
||||
**Inputs**
|
||||
|Name|Type|Binding|Description|
|
||||
|---|---|---|---|
|
||||
|vector|Dynamic vector|none|Vector to project|
|
||||
|plane normal|Dynamic vector|none|Normal orthogonal of the plane|
|
||||
|vector|vector3|none|Vector to project|
|
||||
|plane normal|vector3|none|Normal orthogonal of the plane|
|
||||
|
||||
**Outputs**
|
||||
|Name|Type|Binding|Description|
|
||||
|---|---|---|---|
|
||||
|vector|vector3|None|Output vector|
|
||||
|
||||
**ShaderInc location**
|
||||
<br>`res://addons/ShaderLib/Maths/Vector/ProjectOnPlane.gdshaderinc`
|
||||
|
||||
**Method signature**
|
||||
<br>`vec3 project_on_plane(vec3 vector, vec3 plane_normal)`
|
||||
|
||||
**Parameters**
|
||||
|Name|Type|Description|
|
||||
|---|---|---|
|
||||
|vector|vec3|Input vector|
|
||||
|plane_normal|vec3|Normal vector to the plane|
|
||||
___
|
@ -16,4 +16,15 @@ Returns a sawtooth wave from the value of input <b><i>in</i></b>. Resulting outp
|
||||
|Name|Type|Binding|Description|
|
||||
|---|---|---|---|
|
||||
|out|Dynamic vector|None|Output value|
|
||||
|
||||
**ShaderInc location**
|
||||
<br>`res://addons/ShaderLib/Maths/Wave/SawtoothWave.gdshaderinc`
|
||||
|
||||
**Method signature**
|
||||
<br>`vec4 sawtooth_wave(vec4 input)`
|
||||
|
||||
**Parameters**
|
||||
|Name|Type|Description|
|
||||
|---|---|---|
|
||||
|input|vec4|Input vector|
|
||||
___
|
@ -16,4 +16,15 @@ Returns a square wave from the value of input <b><i>in</i></b>. Resulting output
|
||||
|Name|Type|Binding|Description|
|
||||
|---|---|---|---|
|
||||
|out|Dynamic vector|None|Output value|
|
||||
|
||||
**ShaderInc location**
|
||||
<br>`res://addons/ShaderLib/Maths/Wave/SquareWave.gdshaderinc`
|
||||
|
||||
**Method signature**
|
||||
<br>`vec4 square _wave(vec4 input)`
|
||||
|
||||
**Parameters**
|
||||
|Name|Type|Description|
|
||||
|---|---|---|
|
||||
|input|vec4|Input vector|
|
||||
___
|
@ -16,4 +16,15 @@ Returns a triangle wave from the value of input <b><i>in</i></b>. Resulting outp
|
||||
|Name|Type|Binding|Description|
|
||||
|---|---|---|---|
|
||||
|out|Dynamic vector|None|Output value|
|
||||
|
||||
**ShaderInc location**
|
||||
<br>`res://addons/ShaderLib/Maths/Wave/TriangleWave.gdshaderinc`
|
||||
|
||||
**Method signature**
|
||||
<br>`vec4 triangle_wave(vec4 input)`
|
||||
|
||||
**Parameters**
|
||||
|Name|Type|Description|
|
||||
|---|---|---|
|
||||
|input|vec4|Input vector|
|
||||
___
|
Loading…
x
Reference in New Issue
Block a user