From ae82a493f7346a31136dd0cc1e0439dc2ffd06e6 Mon Sep 17 00:00:00 2001 From: Marcin Date: Fri, 17 Jan 2025 16:37:10 +0000 Subject: [PATCH] note --- include/cglm/noise.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/cglm/noise.h b/include/cglm/noise.h index f6c2bfd..4634417 100644 --- a/include/cglm/noise.h +++ b/include/cglm/noise.h @@ -363,6 +363,10 @@ _glm_noiseDetail_xy2gxyz( vec4 gy, vec4 gz ) { + // NOTE: This function is not *quite* analogous to _glm_noiseDetail_xy2gxyzw + // to try to match the output of glm::perlin. I think it might be a bug in + // in the original implementation, but for now I'm keeping it consistent. -MK + // gx = ixy / 7.0 glm_vec4_divs(ixy, 7.0f, gx); // gx = ixy / 7.0 @@ -379,7 +383,6 @@ _glm_noiseDetail_xy2gxyz( vec4 gxa, gya; glm_vec4_abs(gx, gxa); // gxa = abs(gx) glm_vec4_abs(gy, gya); // gya = abs(gy) - // gz = vec4(0.5) - abs(gx0) - abs(gy0); _glm_vec4_sets(gz, 0.5f); // gz = 0.5