Browse files

Move constant macro outside of top-level sl declaration

  • Loading branch information...
1 parent 4e01aac commit 4ded5f0ae06ef7346bda1c327b6da445346f2947 @dsheets dsheets committed Mar 20, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/noise4D.glsl
View
6 src/noise4D.glsl
@@ -45,16 +45,16 @@ vec4 grad4(float j, vec4 ip)
return p;
}
+
+// (sqrt(5) - 1)/4 = F4, used once below
+#define F4 0.309016994374947451
float snoise(vec4 v)
{
const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4
0.276393202250021, // 2 * G4
0.414589803375032, // 3 * G4
-0.447213595499958); // -1 + 4 * G4
-
-// (sqrt(5) - 1)/4 = F4, used once below
-#define F4 0.309016994374947451
// First corner
vec4 i = floor(v + dot(v, vec4(F4)) );

0 comments on commit 4ded5f0

Please sign in to comment.