1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-01-09 02:43:25 +08:00
Godot-Shader-Lib/README.md

162 lines
5.1 KiB
Markdown
Raw Normal View History

2023-10-11 23:24:18 +05:30
# Godot-Shader-Lib
Visual shader node library for Godot engine.
Adds various extra nodes to use in built-in visual shader editor.
2023-10-12 23:06:13 +05:30
# Installation
2023-10-12 18:56:05 +05:30
Copy the contents of **_addons/ShaderLib_** into the same folder in your project. No activation needed. Custom visual shader nodes work the same way as standard visual shader nodes.
2023-10-12 23:06:13 +05:30
# Uninstallation
Delete the contents of **_addons/ShaderLib_** folder from your project. Make sure to delete it using the Godot editor instead of your default file system program.
2023-10-12 23:06:13 +05:30
# Nodes documentation
<details>
<summary><h1>Procedural nodes</h1></summary>
2023-10-12 22:26:05 +05:30
<details>
2023-10-12 23:11:15 +05:30
<summary><h2>Noise</h2></summary>
<details>
<summary><h3>Gradient Noise node</h3></summary>
Generates a gradient, or Perlin, noise based on input UV. The resulting **_output_** values will be between -1 and 1.
**Inputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|UV|Input UV value|
|scale|float|none|Noise scale|
**Outputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|output|float|None|Output noise value|
___
</details>
<details>
2023-10-12 23:06:13 +05:30
<summary><h3>Voronoi node</h3></summary>
Generates a Voronoi or Worley noise based on input UV. Voronoi noise is generated by calculating distances between a pixel and a lattice of points. By offsetting these points by a pseudo-random number, controlled by **_angle offset_**, a cluster of cells can be generated.
2023-10-12 23:06:13 +05:30
**Inputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|UV|Input UV value|
|cell density|float|none|Density of generated cells|
|angle offset|float|none|Offset values for points|
2023-10-12 23:06:13 +05:30
**Outputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|output|float|None|Output noise value|
|cells|float|None|Raw cell data|
___
2023-10-12 23:06:13 +05:30
</details>
</details>
2023-10-12 23:11:15 +05:30
</details>
2023-10-12 23:06:13 +05:30
<details>
<summary><h1>UV nodes</h1></summary>
<details>
<summary><h3>Flipbook node</h3></summary>
Creates a flipbook, or texture sheet animation, of the UVs supplied to input UV. The amount of tiles on the sheet are defined by the values of the inputs **_rows_** and **_columns_**.
This node can be used to create a texture animation functionality, commonly used for particle effects and sprites, by supplying Time to the input Tile and outputting to the UV input slot of a Texture Sampler.
**Inputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|UV|Input UV value|
|rows|int|none|Amount of horizontal tiles in texture sheet|
|columns|int|none|Amount of vertical tiles in texture sheet|
|start frame|int|none|Start tile index texture sheet|
|end frame|int|none|End tile index texture sheet|
|anim speed|float|none|Animation speed|
**Outputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|None|Output UV value|
___
2023-10-12 23:06:13 +05:30
</details>
<details>
<summary><h3>Radial Shear node</h3></summary>
Applies a radial shear warping effect similar to a wave to the value of input UV.
**Inputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|UV|Input UV value|
|center|vec2|none|Center reference point|
|strength|float|none|Strength of the effect|
|offset|vec2|none|Individual channel offsets|
**Outputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|None|Output UV value|
___
2023-10-12 23:06:13 +05:30
</details>
<details>
<summary><h3>Rotate node</h3></summary>
Rotates value of input UV around a reference point defined by input **_center_** by the amount of input **_rotation_**.
**Inputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|UV|Input UV value|
|center|vec2|none|Center reference point|
|rotation|float|none|Rotation amount in radians|
|use degrees|bool|none|Use degrees instead of radians for **_rotation_** amount|
**Outputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|None|Output UV value|
___
2023-10-12 23:06:13 +05:30
</details>
<details>
<summary><h3>Spherize node</h3></summary>
Applies a spherical warping effect similar to a fisheye camera lens to the value of input UV.
**Inputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|UV|Input UV value|
|center|vec2|none|Center reference point|
|strength|float|none|Strength of the effect|
|offset|vec2|none|Individual channel offsets|
**Outputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|None|Output UV value|
___
2023-10-12 23:06:13 +05:30
</details>
<details>
<summary><h3>Tiling and Offset node</h3></summary>
Tiles and offsets the value of input UV by the inputs **_tiling_** and **_offset_** respectively. This is commonly used for detail maps and scrolling textures over TIME.
**Inputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|UV|Input UV value|
|tiling|vec2|none|Amount of tiling to apply per channel|
|offset|vec2|none|Amount of offset to apply per channel|
**Outputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|None|Output UV value|
___
2023-10-12 23:06:13 +05:30
</details>
<details>
<summary><h3>Twirl node</h3></summary>
Applies a twirl warping effect similar to a black hole to the value of input UV.
**Inputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|UV|Input UV value|
|center|vec2|none|Center reference point|
|strength|float|none|Strength of the effect|
|offset|vec2|none|Individual channel offsets|
**Outputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|None|Output UV value|
___
2023-10-12 23:06:13 +05:30
</details>
</details>