Ver código fonte

[unity] Fix SkeletonGraphic not applying PMA to vertex colors.

pharan 9 anos atrás
pai
commit
c9ffdc7eae

+ 1 - 0
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; }

+ 1 - 0
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))