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
3.0
rem..om 14 years ago
parent ed00bdae05
commit 6bbf141b9f
  1. 4
      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;
}

Loading…
Cancel
Save