Merge remote-tracking branch 'origin/3.7-beta' into 3.7-beta

# Conflicts:
#	spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java
This commit is contained in:
NathanSweet 2017-10-27 11:04:11 +02:00
commit b52fe0b771
3 changed files with 13 additions and 6 deletions

View File

@ -258,13 +258,17 @@ namespace Spine {
break;
case Dip:
pose = MixPose.Setup;
alpha = alphaDip;
alpha = mix == 1 ? 0 : alphaDip;
break;
default:
pose = MixPose.Setup;
alpha = alphaDip;
var dipMix = timelineDipMix[i];
alpha *= Math.Max(0, 1 - dipMix.mixTime / dipMix.mixDuration);
if (mix == 1) {
alpha = 0;
} else {
alpha = alphaDip;
var dipMix = timelineDipMix[i];
alpha *= Math.Max(0, 1 - dipMix.mixTime / dipMix.mixDuration);
}
break;
}
from.totalAlpha += alpha;

View File

@ -726,6 +726,9 @@ namespace Spine.Unity.Editor {
}
void DoRenderPreview (bool drawHandles) {
if (this.PreviewUtilityCamera.activeTexture == null || this.PreviewUtilityCamera.targetTexture == null )
return;
GameObject go = this.m_previewInstance;
if (m_requireRefresh && go != null) {

View File

@ -91,7 +91,7 @@ Shader "Spine/SkeletonGraphic (Premultiply Alpha)"
OUT.vertex.xy += (_ScreenParams.zw-1.0) * float2(-1,1);
#endif
OUT.color = IN.color * _Color;
OUT.color = IN.color * float4(_Color.rgb * _Color.a, _Color.a); // Combine a PMA version of _Color with vertexColor.
return OUT;
}
@ -112,4 +112,4 @@ Shader "Spine/SkeletonGraphic (Premultiply Alpha)"
ENDCG
}
}
}
}