summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-02-22 01:09:37 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-02-22 01:09:37 +0000
commit72b8e6d0b1f9ceb1fc7bd87aa71aa0dd5a15322a (patch)
tree9646358ca8ef20df5eeeb579a5b8bffdf50cb00e /game
parentCheck ray intersects triangle 'in front' of start (diff)
downloadilt-72b8e6d0b1f9ceb1fc7bd87aa71aa0dd5a15322a.tar.bz2
ilt-72b8e6d0b1f9ceb1fc7bd87aa71aa0dd5a15322a.tar.xz
ilt-72b8e6d0b1f9ceb1fc7bd87aa71aa0dd5a15322a.zip
Fix calculation of texture coords of terrain
While we still use this...
Diffstat (limited to 'game')
-rw-r--r--game/terrain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/game/terrain.cpp b/game/terrain.cpp
index d2c8593..7f59b6c 100644
--- a/game/terrain.cpp
+++ b/game/terrain.cpp
@@ -34,7 +34,7 @@ Terrain::generateMeshes()
[this, &vertexIndex](const GeoData::VertexHandle v) {
vertexIndex.emplace(v, vertexIndex.size());
const auto p = geoData->point(v);
- return Vertex {p, p / 10000, geoData->normal(v)};
+ return Vertex {p, RelativePosition2D(p) / 10000.F, geoData->normal(v)};
});
std::for_each(
geoData->faces_begin(), geoData->faces_end(), [this, &vertexIndex, &indices](const GeoData::FaceHandle f) {