1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-09-20 04:15:58 +08:00
Files
Godot-Shader-Lib/documentation/Nodes/Procedural/Noise/Voronoi.md
2024-04-15 22:50:04 +05:30

1.5 KiB

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 angle offset, a cluster of cells can be generated.


Controls

Name Options Description
Distance Euclidean, Manhattan, Chebyshev Distance matrix used to calculate the noise

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
chebyshev power float none Power values for Chebyshev distance matrix

Outputs

Name Type Binding Description
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