From 6b95c8b5dacf87b2a41208f780daeba1c1682761 Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Tue, 15 Apr 2014 21:11:01 +0200 Subject: [PATCH] Additive blending support. --- spine-tk2d/Assets/Spine/SkeletonComponent.cs | 1 + spine-unity/Assets/Spine/SkeletonComponent.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/spine-tk2d/Assets/Spine/SkeletonComponent.cs b/spine-tk2d/Assets/Spine/SkeletonComponent.cs index 2e7c1d52b..f6501ad40 100644 --- a/spine-tk2d/Assets/Spine/SkeletonComponent.cs +++ b/spine-tk2d/Assets/Spine/SkeletonComponent.cs @@ -209,6 +209,7 @@ public class SkeletonComponent : MonoBehaviour { color.r = (byte)(r * slot.R * color.a); color.g = (byte)(g * slot.G * color.a); color.b = (byte)(b * slot.B * color.a); + if (slot.Data.AdditiveBlending) color.a = 0; colors[vertexIndex] = color; colors[vertexIndex + 1] = color; colors[vertexIndex + 2] = color; diff --git a/spine-unity/Assets/Spine/SkeletonComponent.cs b/spine-unity/Assets/Spine/SkeletonComponent.cs index be7115137..8fd094534 100644 --- a/spine-unity/Assets/Spine/SkeletonComponent.cs +++ b/spine-unity/Assets/Spine/SkeletonComponent.cs @@ -209,6 +209,7 @@ public class SkeletonComponent : MonoBehaviour { color.r = (byte)(r * slot.R * color.a); color.g = (byte)(g * slot.G * color.a); color.b = (byte)(b * slot.B * color.a); + if (slot.Data.AdditiveBlending) color.a = 0; colors[vertexIndex] = color; colors[vertexIndex + 1] = color; colors[vertexIndex + 2] = color;