From: Stuart Buchanan Date: Fri, 10 May 2013 19:03:48 +0000 (+0100) Subject: Avoid UV bleeding issues on trees by using a strip of textures. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d18cc815315b5aa87d8f725399ba176c79027f16;p=simgear.git Avoid UV bleeding issues on trees by using a strip of textures. --- diff --git a/simgear/scene/tgdb/TreeBin.cxx b/simgear/scene/tgdb/TreeBin.cxx index a101bf0e..f8e31e6f 100644 --- a/simgear/scene/tgdb/TreeBin.cxx +++ b/simgear/scene/tgdb/TreeBin.cxx @@ -135,13 +135,11 @@ 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.246f)); - t->push_back(Vec2(variety, 0.246f)); + t->push_back(Vec2(variety + 1.0f, 1.0f)); + t->push_back(Vec2(variety, 1.0f)); } Geometry* result = new Geometry; result->setVertexArray(v);