Particle tile number/UV calculation change (#930)

* Update ParticlePointMesh.java

* Update ParticleTriMesh.java
v3.2
JESTERRRRRR 6 years ago committed by Stephen Gold
parent abe614cdec
commit d0d67af395
  1. 2
      jme3-core/src/main/java/com/jme3/effect/ParticlePointMesh.java
  2. 2
      jme3-core/src/main/java/com/jme3/effect/ParticleTriMesh.java

@ -144,7 +144,7 @@ public class ParticlePointMesh extends ParticleMesh {
colors.putInt(p.color.asIntABGR()); colors.putInt(p.color.asIntABGR());
int imgX = p.imageIndex % imagesX; int imgX = p.imageIndex % imagesX;
int imgY = (p.imageIndex - imgX) / imagesY; int imgY = p.imageIndex/imagesX;
float startX = ((float) imgX) / imagesX; float startX = ((float) imgX) / imagesX;
float startY = ((float) imgY) / imagesY; float startY = ((float) imgY) / imagesY;

@ -251,7 +251,7 @@ public class ParticleTriMesh extends ParticleMesh {
if (uniqueTexCoords){ if (uniqueTexCoords){
int imgX = p.imageIndex % imagesX; int imgX = p.imageIndex % imagesX;
int imgY = (p.imageIndex - imgX) / imagesY; int imgY = p.imageIndex / imagesX;
float startX = ((float) imgX) / imagesX; float startX = ((float) imgX) / imagesX;
float startY = ((float) imgY) / imagesY; float startY = ((float) imgY) / imagesY;

Loading…
Cancel
Save