Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Small update to Perlin noise subroutine for proper style
  • Loading branch information
daminton committed Mar 3, 2020
1 parent b76e372 commit 3d0cf1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/util_perlin_noise.f90
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ function util_perlin_noise(xx,yy,zz) result (noise)
w = fade(z)

A = p(xi) + yi
B = p(xi + 1) + yi
B = p(xi+1) + yi

AA = p(A) + zi
BA = p(B) + zi

AB = p(A + 1) + zi
BB = p(B + 1) + zi
AB = p(A+1) + zi
BB = p(B+1) + zi

noise = lerp(w, lerp(v, lerp(u, grad(p(AA ), x , y, z),&
grad(p(BA ), x-1, y, z)),&
Expand Down

0 comments on commit 3d0cf1e

Please sign in to comment.