added downsampling of height map