From c9ffdc7eae5a16ec3e016687cd8c9af47f3e7fe6 Mon Sep 17 00:00:00 2001 From: pharan Date: Sat, 27 Aug 2016 11:38:22 +0800 Subject: [PATCH] [unity] Fix SkeletonGraphic not applying PMA to vertex colors. --- .../Assets/spine-unity/Mesh Generation/ISimpleMeshGenerator.cs | 1 + .../spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/spine-unity/Assets/spine-unity/Mesh Generation/ISimpleMeshGenerator.cs b/spine-unity/Assets/spine-unity/Mesh Generation/ISimpleMeshGenerator.cs index 07d5a5da0..b36666f37 100644 --- a/spine-unity/Assets/spine-unity/Mesh Generation/ISimpleMeshGenerator.cs +++ b/spine-unity/Assets/spine-unity/Mesh Generation/ISimpleMeshGenerator.cs @@ -9,6 +9,7 @@ float Scale { set; } float ZSpacing { get; set; } + bool PremultiplyVertexColors { get; set; } bool AddNormals { get; set; } bool AddTangents { get; set; } diff --git a/spine-unity/Assets/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs b/spine-unity/Assets/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs index 8642121d5..f7591e9b2 100644 --- a/spine-unity/Assets/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs +++ b/spine-unity/Assets/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs @@ -189,6 +189,7 @@ namespace Spine.Unity { this.skeleton = new Skeleton(skeletonData); this.spineMeshGenerator = new Spine.Unity.MeshGeneration.ArraysSimpleMeshGenerator(); // You can switch this out with any other implementer of Spine.Unity.MeshGeneration.ISimpleMeshGenerator + this.spineMeshGenerator.PremultiplyVertexColors = true; // Set the initial Skin and Animation if (!string.IsNullOrEmpty(initialSkinName))