summaryrefslogtreecommitdiff
path: root/game/terrain.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-26 18:50:56 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-26 18:50:56 +0000
commit0c97f72d6f3feab22a37f8d33e2d98080d52dab7 (patch)
tree426e7e767d745f76e5e61f97b8d43b97735df41f /game/terrain.cpp
parentCalculate vertex normals only (diff)
downloadilt-0c97f72d6f3feab22a37f8d33e2d98080d52dab7.tar.bz2
ilt-0c97f72d6f3feab22a37f8d33e2d98080d52dab7.tar.xz
ilt-0c97f72d6f3feab22a37f8d33e2d98080d52dab7.zip
Fix terrain texture tiling
Diffstat (limited to 'game/terrain.cpp')
-rw-r--r--game/terrain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/game/terrain.cpp b/game/terrain.cpp
index 5bb8abd..3778f3d 100644
--- a/game/terrain.cpp
+++ b/game/terrain.cpp
@@ -35,8 +35,8 @@ Terrain::generateMeshes()
std::transform(geoData->vertices_begin(), geoData->vertices_end(), std::back_inserter(vertices),
[this, &vertexIndex](const GeoData::VertexHandle v) {
vertexIndex.emplace(v, vertexIndex.size());
- const glm::vec3 p = geoData->point(v);
- return Vertex {p, p / 10.F, geoData->normal(v)};
+ const auto p = geoData->point(v);
+ return Vertex {p, p / 10000, geoData->normal(v)};
});
std::for_each(
geoData->faces_begin(), geoData->faces_end(), [this, &vertexIndex, &indices](const GeoData::FaceHandle f) {