Open Vixeliz opened 1 year ago
Here is the code from my project using latest noise-rs
let noise = Worley::new(seed)
.set_frequency(0.01251051)
.set_distance_function(distance_functions::euclidean_squared)
.set_return_type(noise::core::worley::ReturnType::Distance);
for x in 0..=CHUNK_SIZE - 1 {
for z in 0..=CHUNK_SIZE - 1 {
for y in 0..=CHUNK_SIZE - 1 {
let full_x = x as i32 + ((CHUNK_SIZE as i32) * pos.x);
let full_z = z as i32 + ((CHUNK_SIZE as i32) * pos.z);
let full_y = y as i32 + ((CHUNK_SIZE as i32) * pos.y);
noise.get([full_x as f64, full_y as f64, full_z as f64]);
This is how the normal Euclidian distance(also happens with Euclidian Squared) worley noise looks like. This screenshot is from nannou but ive also experienced the same in my own project using noise-rs. The circles are very annoying. Thanks for the awesome crate
Here is all the relevant code