Correction rapide noise

This commit is contained in:
MarcEricMartel
2023-09-04 12:59:30 -04:00
parent 55b7051db1
commit 80be6575a4
3 changed files with 5 additions and 5 deletions

View File

@@ -13,8 +13,8 @@ Chunk::Chunk(unsigned int x, unsigned int y) : m_posX(x), m_posY(y) {
for (int ix = 0; ix < CHUNK_SIZE_X; ++ix) // Montagnes
for (int iz = 0; iz < CHUNK_SIZE_Z; ++iz) {
float xnoiz, ynoiz;
xnoiz = (double)(ix + x * CHUNK_SIZE_X) / 1024.;
ynoiz = (double)(iz + y * CHUNK_SIZE_Z) / 1024.;
xnoiz = (double)(ix + x * CHUNK_SIZE_X) / 4096.;
ynoiz = (double)(iz + y * CHUNK_SIZE_Z) / 4096.;
double height = 0;
for (int x = 0; x < 39; ++x) {
height += simplex.eval(xnoiz, ynoiz);