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;