From d90a6f4e95a92d2dd30c520ffaa9a954c52b842a Mon Sep 17 00:00:00 2001 From: stegu Date: Tue, 11 Oct 2011 15:32:56 +0200 Subject: [PATCH] Bug in 3D classic noise (mod289 vec4 -> vec3) --- src/classicnoise3D.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classicnoise3D.glsl b/src/classicnoise3D.glsl index c252e79..7ed6d79 100644 --- a/src/classicnoise3D.glsl +++ b/src/classicnoise3D.glsl @@ -2,7 +2,7 @@ // GLSL textureless classic 3D noise "cnoise", // with an RSL-style periodic variant "pnoise". // Author: Stefan Gustavson (stefan.gustavson@liu.se) -// Version: 2011-08-22 +// Version: 2011-10-11 // // Many thanks to Ian McEwan of Ashima Arts for the // ideas for permutation and gradient selection. @@ -12,7 +12,7 @@ // https://github.com/ashima/webgl-noise // -vec4 mod289(vec4 x) +vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }