Description
I noticed that glm::simplex()
method produces some strange distribution for vec3
input (using version 0.9.7.4).
I made a loop to generate 128x128 height map. For each iteration I call:
float noise = glm::simplex(glm::vec3(i / 16.0f, j / 16.0f, 0.0f));
Then I save that noise to the texture. Here's what I get:
As you can see, there are random-valued pixels looking absolutely out of place, which seem like put each 16-th row and column. For some reason, at integer i
and j
values simplex()
returns very chaotic noise values. E. g. for vec3(0.0f, 0.0f, 0.0f)
input the result is -0.412f
and for vec3(0.0f, 0.0625f, 0.0f)
it is 0.027f
- the difference is huge. Between integer input values the distribution seems normal.
I thought, maybe I do something wrong, but I tried using the same inputs as vec2
and vec4
, and get the following respectively:
Results are perfectly fine, no chaotic dots. Am I missing something or don't understand here? Or is it actually a bug?