changed heightmap scaling

This commit is contained in:
Steffen Fündgens 2015-01-16 14:02:36 +01:00
parent 152e821f71
commit c7dd152dbd

View File

@ -22,7 +22,7 @@ void Terrain::load() {
for(unsigned int rowNum = 0; rowNum < this->heightmapHeight; rowNum++){ //read in the heightmap
this->heightmap[rowNum] = new float[this->heightmapWidth];
for(unsigned int columnNum = 0; columnNum < this->heightmapWidth; columnNum++){
this->heightmap[rowNum][columnNum] = (float)(image[(rowNum*heightmapWidth+columnNum)*4]) / 16;
this->heightmap[rowNum][columnNum] = (float)(image[(rowNum*heightmapWidth+columnNum)*4]) / 8; //<--heightmap is scaled here
}
}