added linear interpolation in image to use it at the terrain generation
[demo] / src / terrain.cc
index c4db7ed..0f10074 100644 (file)
@@ -115,7 +115,7 @@ float Terrain::get_height(float u, float v) const
        sn = sn * 0.5 + 0.5;
 
        if(params.coarse_heightmap.pixels) {
-               Vec4 texel = params.coarse_heightmap.lookup_nearest(u, v);
+               Vec4 texel = params.coarse_heightmap.lookup_linear(u, v, 1.0 / params.tile_usub, 1.0 / params.tile_vsub);
                sn *= texel.x;
        }
        return sn;