소스 검색

Particle tile number/UV calculation change (#930)

* Update ParticlePointMesh.java

* Update ParticleTriMesh.java
JESTERRRRRR 7 년 전
부모
커밋
d0d67af395
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      jme3-core/src/main/java/com/jme3/effect/ParticlePointMesh.java
  2. 1 1
      jme3-core/src/main/java/com/jme3/effect/ParticleTriMesh.java

+ 1 - 1
jme3-core/src/main/java/com/jme3/effect/ParticlePointMesh.java

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

+ 1 - 1
jme3-core/src/main/java/com/jme3/effect/ParticleTriMesh.java

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