From 2c0d4424a246ac3d91f43f5ace0be18443767430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20F=C3=BCndgens?= Date: Fri, 16 Jan 2015 14:02:36 +0100 Subject: [PATCH] changed heightmap scaling --- terrain.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terrain.cc b/terrain.cc index ea2ce0d..bc9f202 100644 --- a/terrain.cc +++ b/terrain.cc @@ -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 } }