Merge remote-tracking branch 'origin/master'

This commit is contained in:
NathanSweet 2016-09-09 11:53:06 +02:00
commit 66a0421803
2 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,7 @@ namespace Spine.Unity.MeshGeneration {
MeshAndMaterials GenerateMesh (ExposedList<SubmeshInstruction> instructions, int startSubmesh, int endSubmesh);
float ZSpacing { get; set; }
bool PremultiplyVertexColors { get; set; }
bool AddNormals { get; set; }
bool AddTangents { get; set; }
}

View File

@ -137,6 +137,7 @@ namespace Spine.Unity.Modules {
var currentRenderer = partsRenderers[rendererIndex];
bool addNormals = skeletonRenderer.calculateNormals;
bool addTangents = skeletonRenderer.calculateTangents;
bool pmaVertexColors = skeletonRenderer.pmaVertexColors;
for (int si = 0, start = 0; si <= lastSubmeshInstruction; si++) {
if (submeshInstructionsItems[si].forceSeparate || si == lastSubmeshInstruction) {
@ -144,6 +145,7 @@ namespace Spine.Unity.Modules {
var meshGenerator = currentRenderer.MeshGenerator;
meshGenerator.AddNormals = addNormals;
meshGenerator.AddTangents = addTangents;
meshGenerator.PremultiplyVertexColors = pmaVertexColors;
if (copyPropertyBlock)
currentRenderer.SetPropertyBlock(copiedBlock);