1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-09-19 20:05:57 +08:00
Files
Godot-Shader-Lib/documentation/Nodes/Procedural/Noise/Voronoi.md

40 lines
1.5 KiB
Markdown
Raw Normal View History

2024-02-26 22:13:45 +05:30
# Voronoi node
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 <b><i>angle offset</i></b>, a cluster of cells can be generated.
<hr>
2024-03-19 13:03:56 +05:30
**Controls**
|Name|Options|Description|
|---|---|---|
|Distance|Euclidean, Manhattan, Chebyshev|Distance matrix used to calculate the noise|
2024-02-26 22:13:45 +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|
2024-03-19 13:03:56 +05:30
|chebyshev power|float|none|Power values for Chebyshev distance matrix|
2024-02-26 22:13:45 +05:30
**Outputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|output|float|None|Output noise value|
|cells|float|None|Raw cell data|
2024-04-15 22:50:04 +05:30
**ShaderInc location**
<br>`res://addons/ShaderLib/Procedural/Noise/Voronoi.gdshaderinc`
**Method signature**
<br>`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|
2024-02-26 22:13:45 +05:30
___