From 9c9907580c315b138f0a0e855e8025856e8afc89 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Wed, 10 Apr 2024 18:13:08 +0530 Subject: [PATCH 01/10] Document typo --- documentation/Nodes/RayMarching/RayMarch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/Nodes/RayMarching/RayMarch.md b/documentation/Nodes/RayMarching/RayMarch.md index 0e5ba62..42f243e 100644 --- a/documentation/Nodes/RayMarching/RayMarch.md +++ b/documentation/Nodes/RayMarching/RayMarch.md @@ -5,7 +5,7 @@ A simple ray marcher for primitive shapes. **Controls** |Name|Options|Description| |---|---|---| -|SDF (Signed Distance Function)|SDBox, SDSphere, SDCapsule, SDCylinder, SDTorus|Signed Distance Functions for the space to draw.| +|SDF (Signed Distance Function)|SDBox, SDSphere, SDCapsule, SDCylinder, SDTorus|Signed Distance Functions for the shape to draw.| **Inputs** |Name|Type|Binding|Description| From f7e9fddd0065951b198999fa1fde16861a2d8223 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Wed, 10 Apr 2024 18:13:18 +0530 Subject: [PATCH 02/10] Update ContrastNode.md --- .../Nodes/Artistic/Adjustment/ContrastNode.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/documentation/Nodes/Artistic/Adjustment/ContrastNode.md b/documentation/Nodes/Artistic/Adjustment/ContrastNode.md index 8e7a92f..b8310e6 100644 --- a/documentation/Nodes/Artistic/Adjustment/ContrastNode.md +++ b/documentation/Nodes/Artistic/Adjustment/ContrastNode.md @@ -12,4 +12,16 @@ Adjusts the contrast of input in by the amount of input cont |Name|Type|Binding|Description| |---|---|---|---| |out|vec3|None|Output value| + +**ShaderInc location** +`res://addons/ShaderLib/Artistic/Adjustment/Contrast.gdshaderinc` + +**Method signature** +`vec3 contrast(input, contrast)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|input|vec3|Input color| +|contrast|float|contrast value| ___ \ No newline at end of file From 7b3fe34b9bcd95e52c5e7576119403d180bc8675 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Wed, 10 Apr 2024 18:14:52 +0530 Subject: [PATCH 03/10] Update ContrastNode.md --- documentation/Nodes/Artistic/Adjustment/ContrastNode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/Nodes/Artistic/Adjustment/ContrastNode.md b/documentation/Nodes/Artistic/Adjustment/ContrastNode.md index b8310e6..5ee9865 100644 --- a/documentation/Nodes/Artistic/Adjustment/ContrastNode.md +++ b/documentation/Nodes/Artistic/Adjustment/ContrastNode.md @@ -14,10 +14,10 @@ Adjusts the contrast of input in by the amount of input cont |out|vec3|None|Output value| **ShaderInc location** -`res://addons/ShaderLib/Artistic/Adjustment/Contrast.gdshaderinc` +
`res://addons/ShaderLib/Artistic/Adjustment/Contrast.gdshaderinc` **Method signature** -`vec3 contrast(input, contrast)` +
`vec3 contrast(input, contrast)` **Parameters** |Name|Type|Description| From b1411a809cc8c9e683ebc9f44765ef4d854045a4 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Wed, 10 Apr 2024 18:26:14 +0530 Subject: [PATCH 04/10] Artistic nodes documentation updated --- .../Nodes/Artistic/Adjustment/HueNode.md | 13 +++++++++++++ .../Nodes/Artistic/Adjustment/ReplaceColorNode.md | 15 +++++++++++++++ .../Nodes/Artistic/Adjustment/SaturationNode.md | 12 ++++++++++++ .../Nodes/Artistic/Adjustment/WhiteBalanceNode.md | 13 +++++++++++++ .../Nodes/Artistic/Mask/ColorMaskNode.md | 14 ++++++++++++++ 5 files changed, 67 insertions(+) diff --git a/documentation/Nodes/Artistic/Adjustment/HueNode.md b/documentation/Nodes/Artistic/Adjustment/HueNode.md index 12df42b..8d88180 100644 --- a/documentation/Nodes/Artistic/Adjustment/HueNode.md +++ b/documentation/Nodes/Artistic/Adjustment/HueNode.md @@ -17,4 +17,17 @@ Offsets the hue of input in by the amount of input offset`res://addons/ShaderLib/Artistic/Adjustment/Hue.gdshaderinc` + +**Method signature** +
`vec3 hue(input, offset, range_index)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|input|vec3|Input color| +|offset|vec3|Amount of offset hue| +|range_index|int|range index, 0 = use degrees as units, 1 = use radians as units| ___ \ No newline at end of file diff --git a/documentation/Nodes/Artistic/Adjustment/ReplaceColorNode.md b/documentation/Nodes/Artistic/Adjustment/ReplaceColorNode.md index b5d3f78..393ebef 100644 --- a/documentation/Nodes/Artistic/Adjustment/ReplaceColorNode.md +++ b/documentation/Nodes/Artistic/Adjustment/ReplaceColorNode.md @@ -15,4 +15,19 @@ Replaces values in input in equal to input from to t |Name|Type|Binding|Description| |---|---|---|---| |out|vec3|None|Output value| + +**ShaderInc location** +
`res://addons/ShaderLib/Artistic/Adjustment/ReplaceColor.gdshaderinc` + +**Method signature** +
`vec3 replace_color(input, from, to, range, fuzziness)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|input|vec3|Input color| +|from|vec3|Color to replace| +|to|vec3|Color to replace with| +|range|float|Replace colors within this range from input from| +|fuzziness|float|Soften edges around selection| ___ \ No newline at end of file diff --git a/documentation/Nodes/Artistic/Adjustment/SaturationNode.md b/documentation/Nodes/Artistic/Adjustment/SaturationNode.md index 03da4a5..7343ef6 100644 --- a/documentation/Nodes/Artistic/Adjustment/SaturationNode.md +++ b/documentation/Nodes/Artistic/Adjustment/SaturationNode.md @@ -12,4 +12,16 @@ Adjusts the saturation of input in by the amount of input sa |Name|Type|Binding|Description| |---|---|---|---| |out|vec3|None|Output value| + +**ShaderInc location** +
`res://addons/ShaderLib/Artistic/Adjustment/Saturation.gdshaderinc` + +**Method signature** +
`vec3 saturation(input, saturation)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|input|vec3|Input color| +|saturation|float|Saturation value| ___ \ No newline at end of file diff --git a/documentation/Nodes/Artistic/Adjustment/WhiteBalanceNode.md b/documentation/Nodes/Artistic/Adjustment/WhiteBalanceNode.md index 421338b..73367cc 100644 --- a/documentation/Nodes/Artistic/Adjustment/WhiteBalanceNode.md +++ b/documentation/Nodes/Artistic/Adjustment/WhiteBalanceNode.md @@ -13,4 +13,17 @@ Adjusts the temperature and tint of input in by the amount of inpu |Name|Type|Binding|Description| |---|---|---|---| |out|vec3|None|Output value| + +**ShaderInc location** +
`res://addons/ShaderLib/Artistic/Adjustment/WhiteBalance.gdshaderinc` + +**Method signature** +
`vec3 white_balance(input, temperature, tint)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|input|vec3|Input color| +|temperature|float|Temperature offset value| +|tint|float|Tint offset value| ___ \ No newline at end of file diff --git a/documentation/Nodes/Artistic/Mask/ColorMaskNode.md b/documentation/Nodes/Artistic/Mask/ColorMaskNode.md index 9a9d30f..5b21afa 100644 --- a/documentation/Nodes/Artistic/Mask/ColorMaskNode.md +++ b/documentation/Nodes/Artistic/Mask/ColorMaskNode.md @@ -14,4 +14,18 @@ Creates a mask from values in input in equal to input mask c |Name|Type|Binding|Description| |---|---|---|---| |out|vec3|None|Output mask value| + +**ShaderInc location** +
`res://addons/ShaderLib/Artistic/Mask/ColorMask.gdshaderinc` + +**Method signature** +
`vec4 color_mask(input, mask_color, range, fuzziness)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|input|vec3|Input color| +|mask_color|vec3|Color to use for mask| +|range|float|Select colors within this range from input mask color| +|fuzziness|float|Feather edges around selection. Higher values result in a softer selection mask.| ___ \ No newline at end of file From b7c13a973a23b43fe216b4de67a2f2b31892c379 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Mon, 15 Apr 2024 22:20:05 +0530 Subject: [PATCH 05/10] Update Mesh.md --- documentation/Nodes/Geometry/Mesh.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/documentation/Nodes/Geometry/Mesh.md b/documentation/Nodes/Geometry/Mesh.md index f366ba2..2d702f5 100644 --- a/documentation/Nodes/Geometry/Mesh.md +++ b/documentation/Nodes/Geometry/Mesh.md @@ -7,4 +7,15 @@ Provides accees to node's position and scale in world space. |---|---|---|---| |position|vec3|None|Node/object position in world space| |scale|vec3|None|Node/object scale in world space| + +**ShaderInc location** +
`res://addons/ShaderLib/Geometry/MeshNode.gdshaderinc` + +**Method signature** +
`vec3 geometry_node_scale_world(mat4 model_matrix)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|model_matrix|mat4|Model matrix of the mesh| ___ \ No newline at end of file From 8a036a2abf06a591d7e67c91da086849c84b4de9 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Mon, 15 Apr 2024 22:29:35 +0530 Subject: [PATCH 06/10] Maths node documentation updated --- .../Vector/Distance/ChebyshevDistance.md | 22 +++++++++++++++++++ .../Vector/Distance/ManhattanDistance.md | 20 +++++++++++++++++ .../Nodes/Maths/Wave/NoiseSineWave.md | 12 ++++++++++ 3 files changed, 54 insertions(+) diff --git a/documentation/Nodes/Maths/Vector/Distance/ChebyshevDistance.md b/documentation/Nodes/Maths/Vector/Distance/ChebyshevDistance.md index 866d179..8da8ff2 100644 --- a/documentation/Nodes/Maths/Vector/Distance/ChebyshevDistance.md +++ b/documentation/Nodes/Maths/Vector/Distance/ChebyshevDistance.md @@ -18,4 +18,26 @@ Returns the distance between two points using Chebyshev distance matrix. |Name|Type|Binding|Description| |---|---|---|---| |distance|float|None|Distance between 2 points| + +**ShaderInc location** +
For 2D - `res://addons/ShaderLib/Maths/Vector/Distance/Chebyshev2D.gdshaderinc` +
For 3D - `res://addons/ShaderLib/Maths/Vector/Distance/Chebyshev3D.gdshaderinc` + +**Method signature** +
For 2D - `float chebyshev_distance_2d(vec2 point1, vec2 point2, float power)` +
For 3D - `float chebyshev_distance_3d(vec3 point1, vec3 point2, float power)` + +**Parameters for 2D** +|Name|Type|Description| +|---|---|---| +|point1|vec2|Point a| +|point2|vec2|Point b| +|power|float|Power for Chebyshev distance| + +**Parameters for 3D** +|Name|Type|Description| +|---|---|---| +|point1|vec3|Point a| +|point2|vec3|Point b| +|power|float|Power for Chebyshev distance| ___ \ No newline at end of file diff --git a/documentation/Nodes/Maths/Vector/Distance/ManhattanDistance.md b/documentation/Nodes/Maths/Vector/Distance/ManhattanDistance.md index a1a2d4a..245a61c 100644 --- a/documentation/Nodes/Maths/Vector/Distance/ManhattanDistance.md +++ b/documentation/Nodes/Maths/Vector/Distance/ManhattanDistance.md @@ -17,4 +17,24 @@ Returns the distance between two points using Manhattan distance matrix. |Name|Type|Binding|Description| |---|---|---|---| |distance|float|None|Distance between 2 points| + +**ShaderInc location** +
For 2D - `res://addons/ShaderLib/Maths/Vector/Distance/Manhattan2D.gdshaderinc` +
For 3D - `res://addons/ShaderLib/Maths/Vector/Distance/Manhattan3D.gdshaderinc` + +**Method signature** +
For 2D - `float manhattan_distance_2d(vec2 point1, vec2 point2)` +
For 3D - `float manhattan_distance_3d(vec3 point1, vec3 point2)` + +**Parameters for 2D** +|Name|Type|Description| +|---|---|---| +|point1|vec2|Point a| +|point2|vec2|Point b| + +**Parameters for 3D** +|Name|Type|Description| +|---|---|---| +|point1|vec3|Point a| +|point2|vec3|Point b| ___ \ No newline at end of file diff --git a/documentation/Nodes/Maths/Wave/NoiseSineWave.md b/documentation/Nodes/Maths/Wave/NoiseSineWave.md index 417d4f7..0199d13 100644 --- a/documentation/Nodes/Maths/Wave/NoiseSineWave.md +++ b/documentation/Nodes/Maths/Wave/NoiseSineWave.md @@ -17,4 +17,16 @@ Returns the sine of the value of input in. For variance, psuedo-ra |Name|Type|Binding|Description| |---|---|---|---| |out|Dynamic vector|None|Output value| + +**ShaderInc location** +
`res://addons/ShaderLib/Maths/Wave/NoiseSineWave.gdshaderinc` + +**Method signature** +
`vec4 noise_sine_wave(vec4 input, vec2 min_max)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|input|vec4|Input vector| +|min_max|vec2|Minimum and Maximum values for noise intensity| ___ \ No newline at end of file From 2dadda73fcf8413d502c65315804282ea389d2b7 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Mon, 15 Apr 2024 22:50:04 +0530 Subject: [PATCH 07/10] Procedural nodes documentation updated --- documentation/Nodes/Procedural/CheckerBoard.md | 14 ++++++++++++++ .../Nodes/Procedural/Fractals/KochFractal.md | 16 ++++++++++++++++ .../Nodes/Procedural/Noise/GradientNoise.md | 12 ++++++++++++ .../Nodes/Procedural/Noise/GyroidNoise.md | 15 +++++++++++++++ .../Nodes/Procedural/Noise/SimpleNoise.md | 13 +++++++++++++ documentation/Nodes/Procedural/Noise/Voronoi.md | 17 +++++++++++++++++ .../Nodes/Procedural/Shapes/Ellipse.md | 13 +++++++++++++ .../Nodes/Procedural/Shapes/Polygon.md | 14 ++++++++++++++ .../Nodes/Procedural/Shapes/Rectangle.md | 13 +++++++++++++ .../Nodes/Procedural/Shapes/RoundedPolygon.md | 15 +++++++++++++++ .../Nodes/Procedural/Shapes/RoundedRectangle.md | 14 ++++++++++++++ 11 files changed, 156 insertions(+) diff --git a/documentation/Nodes/Procedural/CheckerBoard.md b/documentation/Nodes/Procedural/CheckerBoard.md index 9ed1cad..fc7b6ea 100644 --- a/documentation/Nodes/Procedural/CheckerBoard.md +++ b/documentation/Nodes/Procedural/CheckerBoard.md @@ -14,4 +14,18 @@ Generates a checkerboard of alternating colors between inputs color A< |Name|Type|Binding|Description| |---|---|---|---| |output|vec3|None|Output checkerboard value| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/CheckerBoard.gdshaderinc` + +**Method signature** +
`vec3 checker_board(vec2 uv, vec3 color_a, vec3 color_b, vec2 frequency)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|color a|vec3|First checker color| +|color b|vec3|Second checker color| +|frequency|vec2|Scale of checkerboard per axis| ___ \ No newline at end of file diff --git a/documentation/Nodes/Procedural/Fractals/KochFractal.md b/documentation/Nodes/Procedural/Fractals/KochFractal.md index 4448476..3148133 100644 --- a/documentation/Nodes/Procedural/Fractals/KochFractal.md +++ b/documentation/Nodes/Procedural/Fractals/KochFractal.md @@ -16,4 +16,20 @@ Generates an koch curve similar to ice fractal shape based on input UV at the si |---|---|---|---| |out|float|None|Output fractal value| |uv|vec2|None|Output UV value| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/Fractals/KochFractal.gdshaderinc` + +**Method signature** +
`float koch_fractal(vec2 uv, float outline, int iteration, float shape_width, float shape_height, out vec2 koch_uv)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|outline|float|Shape outline thickness| +|iterations|int|Number of steps to repeat the fractal shape| +|shape_width|float|Fractal width| +|shape_height|float|Fractal height| +|koch_uv|out vec2|Returns Koch fractal UV| ___ \ No newline at end of file diff --git a/documentation/Nodes/Procedural/Noise/GradientNoise.md b/documentation/Nodes/Procedural/Noise/GradientNoise.md index fc516fd..393af87 100644 --- a/documentation/Nodes/Procedural/Noise/GradientNoise.md +++ b/documentation/Nodes/Procedural/Noise/GradientNoise.md @@ -12,4 +12,16 @@ Generates a gradient, or Perlin noise based on input UV. The resulting out |Name|Type|Binding|Description| |---|---|---|---| |output|float|None|Output noise value| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/Noise/GradientNoise.gdshaderinc` + +**Method signature** +
`float gradient_noise(vec2 uv, float scale)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|scale|float|Noise scale| ___ \ No newline at end of file diff --git a/documentation/Nodes/Procedural/Noise/GyroidNoise.md b/documentation/Nodes/Procedural/Noise/GyroidNoise.md index 0015456..4f81839 100644 --- a/documentation/Nodes/Procedural/Noise/GyroidNoise.md +++ b/documentation/Nodes/Procedural/Noise/GyroidNoise.md @@ -15,4 +15,19 @@ Generates a gyroid noise based on input UV. The resulting output v |Name|Type|Binding|Description| |---|---|---|---| |output|float|None|Output noise value| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/Noise/GyroidNoise.gdshaderinc` + +**Method signature** +
`float gyroid_noise(vec2 uv, float scale, vec2 ratio, float height, float thickness)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|scale|float|Noise scale| +|ratio|vec2|Noise ratio for X and Y axes| +|height|float|Noise height| +|thickness|float|Noise thickness, clamped between 0 and 1| ___ \ No newline at end of file diff --git a/documentation/Nodes/Procedural/Noise/SimpleNoise.md b/documentation/Nodes/Procedural/Noise/SimpleNoise.md index e1c7097..40d7d3e 100644 --- a/documentation/Nodes/Procedural/Noise/SimpleNoise.md +++ b/documentation/Nodes/Procedural/Noise/SimpleNoise.md @@ -13,4 +13,17 @@ Generates a simplex, or value noise based on input UV. The resulting outpu |Name|Type|Binding|Description| |---|---|---|---| |output|float|None|Output noise value| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/Noise/SimpleNoise.gdshaderinc` + +**Method signature** +
`float simple_noise(vec2 uv, float scale, int octaves)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|scale|float|Noise scale| +|octaves|int|Octaves/Layers of noise, clamped between 1 and 6.| ___ \ No newline at end of file diff --git a/documentation/Nodes/Procedural/Noise/Voronoi.md b/documentation/Nodes/Procedural/Noise/Voronoi.md index 19f438e..4cedceb 100644 --- a/documentation/Nodes/Procedural/Noise/Voronoi.md +++ b/documentation/Nodes/Procedural/Noise/Voronoi.md @@ -20,4 +20,21 @@ Generates a Voronoi or Worley noise based on input UV. Voronoi noise is generate |---|---|---|---| |output|float|None|Output noise value| |cells|float|None|Raw cell data| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/Noise/Voronoi.gdshaderinc` + +**Method signature** +
`void voronoi_noise(vec2 uv, float cell_density, float angle_offset, int distance_index, float chebyshev_power, out float output, out float cells)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|cell_density|float|Density of generated cells| +|angle_offset|float|Offset values for points| +|distance_index|int|Distance matrix to use for Voronoi, 0 = Euclidean, 1 = Manhattan, 2 = Chebyshev| +|chebyshev_power|float|Power for Chebyshev distance| +|output|out float|Output noise value| +|cells|out float|Output raw cell data| ___ \ No newline at end of file diff --git a/documentation/Nodes/Procedural/Shapes/Ellipse.md b/documentation/Nodes/Procedural/Shapes/Ellipse.md index 4951947..27abcb9 100644 --- a/documentation/Nodes/Procedural/Shapes/Ellipse.md +++ b/documentation/Nodes/Procedural/Shapes/Ellipse.md @@ -13,4 +13,17 @@ Generates an ellipse shape based on input UV at the size specified by inputs |Name|Type|Binding|Description| |---|---|---|---| |output|float|None|Output ellipse value| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/Shapes/Ellipse.gdshaderinc` + +**Method signature** +
`float ellipse_shape(vec2 uv, float width, float height)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|width|float|Ellipse width| +|height|float|Ellipse height| ___ \ No newline at end of file diff --git a/documentation/Nodes/Procedural/Shapes/Polygon.md b/documentation/Nodes/Procedural/Shapes/Polygon.md index 5c43999..97435f4 100644 --- a/documentation/Nodes/Procedural/Shapes/Polygon.md +++ b/documentation/Nodes/Procedural/Shapes/Polygon.md @@ -14,4 +14,18 @@ Generates a regular polygon shape based on input UV at the size specified by inp |Name|Type|Binding|Description| |---|---|---|---| |output|float|None|Output polygon value| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/Shapes/Polygon.gdshaderinc` + +**Method signature** +
`float polygon_shape(vec2 uv, int sides, float width, float height)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|sides|int|Number of sides of the polygon| +|width|float|Polygon width| +|height|float|Polygon height| ___ \ No newline at end of file diff --git a/documentation/Nodes/Procedural/Shapes/Rectangle.md b/documentation/Nodes/Procedural/Shapes/Rectangle.md index 1db3c0e..d6d6312 100644 --- a/documentation/Nodes/Procedural/Shapes/Rectangle.md +++ b/documentation/Nodes/Procedural/Shapes/Rectangle.md @@ -13,4 +13,17 @@ Generates a rectangle shape based on input UV at the size specified by inputs `res://addons/ShaderLib/Procedural/Shapes/Rectangle.gdshaderinc` + +**Method signature** +
`float rectangle_shape(vec2 uv, float width, float height)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|width|float|Rectangle width| +|height|float|Rectangle height| ___ \ No newline at end of file diff --git a/documentation/Nodes/Procedural/Shapes/RoundedPolygon.md b/documentation/Nodes/Procedural/Shapes/RoundedPolygon.md index d50ee8a..09fd7f9 100644 --- a/documentation/Nodes/Procedural/Shapes/RoundedPolygon.md +++ b/documentation/Nodes/Procedural/Shapes/RoundedPolygon.md @@ -15,4 +15,19 @@ Generates a rounded polygon shape based on input UV at the size specified by inp |Name|Type|Binding|Description| |---|---|---|---| |output|float|None|Output rounded polygon value| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/Shapes/RoundedPolygon.gdshaderinc` + +**Method signature** +
`float rounded_polygon_shape(vec2 uv, float width, float height, float sides, float roundness)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|width|float|Ellipse width| +|height|float|Ellipse height| +|sides|float|Number of sides of the polygon| +|roundness|float|Corner radius| ___ \ No newline at end of file diff --git a/documentation/Nodes/Procedural/Shapes/RoundedRectangle.md b/documentation/Nodes/Procedural/Shapes/RoundedRectangle.md index 26d7a32..119664f 100644 --- a/documentation/Nodes/Procedural/Shapes/RoundedRectangle.md +++ b/documentation/Nodes/Procedural/Shapes/RoundedRectangle.md @@ -14,4 +14,18 @@ Generates a rounded rectangle shape based on input UV at the size specified by i |Name|Type|Binding|Description| |---|---|---|---| |output|float|None|Output rounded rectangle value| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/Shapes/RoundedRectangle.gdshaderinc` + +**Method signature** +
`float rounded_rectangle_shape(vec2 uv, float width, float height, float radius)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|width|float|Rectangle width| +|height|float|Rectangle height| +|radius|float|Corner radius| ___ \ No newline at end of file From 6bd06becac7ac9cdba3e7ed46fae947c81f8b371 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Mon, 15 Apr 2024 22:52:55 +0530 Subject: [PATCH 08/10] Update RoundedPolygon.md --- documentation/Nodes/Procedural/Shapes/RoundedPolygon.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/Nodes/Procedural/Shapes/RoundedPolygon.md b/documentation/Nodes/Procedural/Shapes/RoundedPolygon.md index 09fd7f9..3049728 100644 --- a/documentation/Nodes/Procedural/Shapes/RoundedPolygon.md +++ b/documentation/Nodes/Procedural/Shapes/RoundedPolygon.md @@ -26,8 +26,8 @@ Generates a rounded polygon shape based on input UV at the size specified by inp |Name|Type|Description| |---|---|---| |uv|vec2|Input UV value| -|width|float|Ellipse width| -|height|float|Ellipse height| +|width|float|Polygon width| +|height|float|Polygon height| |sides|float|Number of sides of the polygon| |roundness|float|Corner radius| ___ \ No newline at end of file From 0b22ea2ce1763ba14d7538d9a88ad7f4ba378e17 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Mon, 15 Apr 2024 22:53:59 +0530 Subject: [PATCH 09/10] Update Documentation.md --- documentation/Documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/Documentation.md b/documentation/Documentation.md index 2731592..fd387e7 100644 --- a/documentation/Documentation.md +++ b/documentation/Documentation.md @@ -54,7 +54,7 @@ For example if you want to rotate UV in your **_.gdshader_** file, you can use `

 Fractals

-

  Koch Fractal node

+

  Koch Fractal node

 Noise

From 9f8087e91de3b2f19c8a38ad1bae4807fab26024 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Mon, 15 Apr 2024 23:04:10 +0530 Subject: [PATCH 10/10] UV nodes documentation updated --- documentation/Nodes/UV/Flipbook.md | 14 ++++++++++++++ documentation/Nodes/UV/ParallaxMapping.md | 17 +++++++++++++++++ documentation/Nodes/UV/RadialShear.md | 14 ++++++++++++++ documentation/Nodes/UV/Rotate.md | 16 +++++++++++++++- documentation/Nodes/UV/Spherize.md | 14 ++++++++++++++ documentation/Nodes/UV/Swirl.md | 14 ++++++++++++++ documentation/Nodes/UV/Twirl.md | 14 ++++++++++++++ 7 files changed, 102 insertions(+), 1 deletion(-) diff --git a/documentation/Nodes/UV/Flipbook.md b/documentation/Nodes/UV/Flipbook.md index a27ea9e..112f984 100644 --- a/documentation/Nodes/UV/Flipbook.md +++ b/documentation/Nodes/UV/Flipbook.md @@ -15,4 +15,18 @@ This node can be used to create a texture animation functionality, commonly used |Name|Type|Binding|Description| |---|---|---|---| |uv|vec2|None|Output UV value| + +**ShaderInc location** +
`res://addons/ShaderLib/UV/FlipbookUV.gdshaderinc` + +**Method signature** +
`vec2 flipbook_uv(vec2 uv, int rows, int columns, float anim_speed)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input UV value| +|rows|int|Amount of horizontal tiles in texture sheet| +|columns|int|Amount of vertical tiles in texture sheet| +|anim speed|float|Animation speed| ___ \ No newline at end of file diff --git a/documentation/Nodes/UV/ParallaxMapping.md b/documentation/Nodes/UV/ParallaxMapping.md index 61df2bd..dee1ed2 100644 --- a/documentation/Nodes/UV/ParallaxMapping.md +++ b/documentation/Nodes/UV/ParallaxMapping.md @@ -12,4 +12,21 @@ The Parallax Mapping node lets you create a parallax effect that displaces a Mat |Name|Type|Binding|Description| |---|---|---|---| |uv|vec2|None|Output UV value| + +**ShaderInc location** +
`res://addons/ShaderLib/UV/ParallaxMappingUV.gdshaderinc` + +**Method signature** +
`vec2 parallax_mapping_uv(sampler2D height, float amplitude, vec2 uv, vec3 tangent, vec3 normal, vec3 binormal, vec3 view)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|height|sampler2D|Height map texture| +|amplitude|float|amplitude or depth of the effect| +|uv|vec2|Input uv| +|tangent|vec3|Tangent vector| +|normal|vec3|Normal vector| +|binormal|vec3|Binormal vector| +|view|vec3|View vector| ___ \ No newline at end of file diff --git a/documentation/Nodes/UV/RadialShear.md b/documentation/Nodes/UV/RadialShear.md index f2defec..dd5724d 100644 --- a/documentation/Nodes/UV/RadialShear.md +++ b/documentation/Nodes/UV/RadialShear.md @@ -14,4 +14,18 @@ Applies a radial shear warping effect similar to a wave to the value of input UV |Name|Type|Binding|Description| |---|---|---|---| |uv|vec2|None|Output UV value| + +**ShaderInc location** +
`res://addons/ShaderLib/UV/RadialShearUV.gdshaderinc` + +**Method signature** +
`vec2 radial_shear_uv(vec2 uv, vec2 center, float strength, vec2 offset)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input uv| +|center|vec2|Center reference point| +|strength|float|Strength of the effect| +|offset|vec2|Individual channel offsets| ___ \ No newline at end of file diff --git a/documentation/Nodes/UV/Rotate.md b/documentation/Nodes/UV/Rotate.md index 27b4013..053c2e8 100644 --- a/documentation/Nodes/UV/Rotate.md +++ b/documentation/Nodes/UV/Rotate.md @@ -7,7 +7,7 @@ Rotates value of input UV around a reference point defined by input center |---|---|---|---| |uv|vec2|UV|Input UV value| |center|vec2|none|Center reference point| -|rotation|float|none|Rotation amount in radians| +|rotation|float|none|Rotation amount| **Controls** |Name|Options|Description| @@ -18,4 +18,18 @@ Rotates value of input UV around a reference point defined by input center |Name|Type|Binding|Description| |---|---|---|---| |uv|vec2|None|Output UV value| + +**ShaderInc location** +
`res://addons/ShaderLib/UV/RotateUV.gdshaderinc` + +**Method signature** +
`vec2 rotate_uv(vec2 uv, vec2 center, float rotation, bool use_degrees)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input uv| +|center|vec2|Center reference point| +|rotation|float|Rotation amount| +|use_degrees|bool|Specifies the unit for rotation, true = Degrees, false = Radians| ___ \ No newline at end of file diff --git a/documentation/Nodes/UV/Spherize.md b/documentation/Nodes/UV/Spherize.md index e541be4..087366e 100644 --- a/documentation/Nodes/UV/Spherize.md +++ b/documentation/Nodes/UV/Spherize.md @@ -14,4 +14,18 @@ Applies a spherical warping effect similar to a fisheye camera lens to the value |Name|Type|Binding|Description| |---|---|---|---| |uv|vec2|None|Output UV value| + +**ShaderInc location** +
`res://addons/ShaderLib/UV/SpherizeUV.gdshaderinc` + +**Method signature** +
`vec2 spherize_uv(vec2 uv, vec2 center, float strength, vec2 offset)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input uv| +|center|vec2|Center reference point| +|strength|float|Strength of the effect| +|offset|vec2|Individual channel offsets| ___ \ No newline at end of file diff --git a/documentation/Nodes/UV/Swirl.md b/documentation/Nodes/UV/Swirl.md index 2e979dd..b7df4b5 100644 --- a/documentation/Nodes/UV/Swirl.md +++ b/documentation/Nodes/UV/Swirl.md @@ -14,4 +14,18 @@ Applies a swirl warping effect similar to a black hole to the value of input UV. |Name|Type|Binding|Description| |---|---|---|---| |uv|vec2|None|Output UV value| + +**ShaderInc location** +
`res://addons/ShaderLib/UV/SwirlUV.gdshaderinc` + +**Method signature** +
`vec2 swirl_uv(vec2 uv, vec2 center, float strength, vec2 offset)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input uv| +|center|vec2|Center reference point| +|strength|float|Strength of the effect| +|offset|vec2|Individual channel offsets| ___ \ No newline at end of file diff --git a/documentation/Nodes/UV/Twirl.md b/documentation/Nodes/UV/Twirl.md index 935ed51..bf0ec5c 100644 --- a/documentation/Nodes/UV/Twirl.md +++ b/documentation/Nodes/UV/Twirl.md @@ -14,4 +14,18 @@ Applies a twirl warping effect similar to a black hole to the value of input UV. |Name|Type|Binding|Description| |---|---|---|---| |uv|vec2|None|Output UV value| + +**ShaderInc location** +
`res://addons/ShaderLib/UV/TwirlUV.gdshaderinc` + +**Method signature** +
`vec2 twirl_uv(vec2 uv, vec2 center, float strength, vec2 offset)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|uv|vec2|Input uv| +|center|vec2|Center reference point| +|strength|float|Strength of the effect| +|offset|vec2|Individual channel offsets| ___ \ No newline at end of file