From 7c7109edf4160890aac7c98aeee206002cecb551 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Wed, 1 May 2013 22:01:45 +0100 Subject: [PATCH] Reduce the height of tree UV coordinates to work around mipmap issues. --- simgear/scene/tgdb/TreeBin.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/simgear/scene/tgdb/TreeBin.cxx b/simgear/scene/tgdb/TreeBin.cxx index 3f67483a..a101bf0e 100644 --- a/simgear/scene/tgdb/TreeBin.cxx +++ b/simgear/scene/tgdb/TreeBin.cxx @@ -135,11 +135,13 @@ Geometry* makeSharedTreeGeometry(int numQuads) // space, as the texture has a number of different trees on // it. Here we assign random coordinates and let the shader // choose the variety. + // Height isn't quite 0.25 to allow for UV map bleeding when + // mipmaps are generated. float variety = mt_rand(&seed); t->push_back(Vec2(variety, 0.0f)); t->push_back(Vec2(variety + 1.0f, 0.0f)); - t->push_back(Vec2(variety + 1.0f, 0.25f)); - t->push_back(Vec2(variety, 0.25f)); + t->push_back(Vec2(variety + 1.0f, 0.246f)); + t->push_back(Vec2(variety, 0.246f)); } Geometry* result = new Geometry; result->setVertexArray(v); -- 2.39.5