]> git.mxchange.org Git - simgear.git/commitdiff
Avoid UV bleeding issues on trees by using a strip of textures.
authorStuart Buchanan <stuart_d_buchanan@yahoo.co.uk>
Fri, 10 May 2013 19:03:48 +0000 (20:03 +0100)
committerStuart Buchanan <stuart_d_buchanan@yahoo.co.uk>
Fri, 10 May 2013 19:03:48 +0000 (20:03 +0100)
simgear/scene/tgdb/TreeBin.cxx

index a101bf0e5c86b0b5809aa209cc12589c0d6cc06e..f8e31e6f5e7a87c5c7e4680dfe309615e451d05c 100644 (file)
@@ -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);