From 56abccb5087e58624fb95921060c35cbdc2fbab5 Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Mon, 4 Apr 2016 11:11:24 +0200 Subject: [PATCH] Fixed tinting for non-PMA textures. closes #489 --- .../src/spine/starling/SkeletonSprite.as | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as b/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as index 8b5553674..babbd091a 100644 --- a/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as +++ b/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as @@ -162,9 +162,15 @@ public class SkeletonSprite extends DisplayObject { } if (image) { a *= skeletonA * slot.a; - r *= skeletonR * slot.r * a; - g *= skeletonG * slot.g * a; - b *= skeletonB * slot.b * a; + if (image.texture.premultipliedAlpha) { + r *= skeletonR * slot.r * 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); } }