projects
/
demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added linear interpolation in image to use it at the terrain generation
[demo]
/
src
/
terrain.cc
diff --git
a/src/terrain.cc
b/src/terrain.cc
index
c4db7ed
..
0f10074
100644
(file)
--- a/
src/terrain.cc
+++ b/
src/terrain.cc
@@
-115,7
+115,7
@@
float Terrain::get_height(float u, float v) const
sn = sn * 0.5 + 0.5;
if(params.coarse_heightmap.pixels) {
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;
sn *= texel.x;
}
return sn;