Permalink
Browse files

Bug in 3D classic noise (mod289 vec4 -> vec3)

  • Loading branch information...
1 parent d90a6f4 commit 4e01aac75bcc3cf8afe439315bbd89cd1ca7ba1d stegu committed Oct 11, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/classicnoise3D.glsl
@@ -17,6 +17,11 @@ vec3 mod289(vec3 x)
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
+vec4 mod289(vec4 x)
+{
+ return x - floor(x * (1.0 / 289.0)) * 289.0;
+}
+
vec4 permute(vec4 x)
{
return mod289(((x*34.0)+1.0)*x);

0 comments on commit 4e01aac

Please sign in to comment.