Browse Source

terrain : fixed an issue on texture coordinates calculation (Some worm hole through space and time prevented the fix to go with previous commit....or that's just me)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8242 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om 14 years ago
parent
commit
6bbf141b9f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      engine/src/terrain/com/jme3/terrain/geomipmap/LODGeomap.java

+ 2 - 2
engine/src/terrain/com/jme3/terrain/geomipmap/LODGeomap.java

@@ -135,8 +135,8 @@ public class LODGeomap extends GeoMap {
         float offsetX = offset.x + (offsetAmount * 1.0f);
         float offsetY = -offset.y + (offsetAmount * 1.0f);//note the -, we flip the tex coords
 
-        store.set((((float) x) + offsetX) / (float) (totalSize ), // calculates percentage of texture here
-                (((float) y) + offsetY) / (float) (totalSize ));
+        store.set((((float) x) + offsetX) / (float) (totalSize - 1), // calculates percentage of texture here
+                (((float) y) + offsetY) / (float) (totalSize - 1));
         return store;
     }