Particle tile number/UV calculation change (#930)

* Update ParticlePointMesh.java

* Update ParticleTriMesh.java
This commit is contained in:
JESTERRRRRR 2018-10-04 23:29:21 +01:00 committed by Stephen Gold
parent abe614cdec
commit d0d67af395
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;