Why is my Simplex Noise appearing in four columns?
Posted
by
Joe the Person
on Game Development
See other posts from Game Development
or by Joe the Person
Published on 2014-06-23T03:40:30Z
Indexed on
2014/08/22
10:28 UTC
Read the original article
Hit count: 353
I'm trying to make a Texture
out of Simplex noise, but it keeps appearing like this regardless of how big or small scale
is:
The following code is used to produce the image's color date:
private Color[,] GetSimplex() {
Color[,] colors = new Color[800, 600];
float scale = colors.GetLength(0);
for (int x = 0; x < 800; x++) {
for (int y = 0; y < 600; y++) {
byte noise = (byte)(Noise.Generate(x / scale, y / scale) * 255);
colors[x, y] = new Color(noise, noise, noise);
}
}
return colors;
}
© Game Development or respective owner