Fixed tinting for non-PMA textures.

closes #489
This commit is contained in:
NathanSweet 2016-04-04 11:11:24 +02:00
parent a60a0d1b78
commit 56abccb508

View File

@ -162,9 +162,15 @@ public class SkeletonSprite extends DisplayObject {
} }
if (image) { if (image) {
a *= skeletonA * slot.a; a *= skeletonA * slot.a;
r *= skeletonR * slot.r * a; if (image.texture.premultipliedAlpha) {
g *= skeletonG * slot.g * a; r *= skeletonR * slot.r * a;
b *= skeletonB * slot.b * a; g *= skeletonG * slot.g * a;
b *= skeletonB * slot.b * a;
} else {
r *= skeletonR * slot.r;
g *= skeletonG * slot.g;
b *= skeletonB * slot.b;
}
polygonBatch.add(image.texture, worldVertices, verticesLength, uvs, triangles, r, g, b, a, slot.data.blendMode, matrix); polygonBatch.add(image.texture, worldVertices, verticesLength, uvs, triangles, r, g, b, a, slot.data.blendMode, matrix);
} }
} }