mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed incorrect rendering when CanvasGroup compatible is enabled on SkeletonGraphic TintBlack shader. Closes #1908.
This commit is contained in:
parent
80e2b78dd1
commit
43565f197d
@ -566,7 +566,8 @@ namespace Spine.Unity {
|
|||||||
|
|
||||||
float tintBlackAlpha = 1.0f;
|
float tintBlackAlpha = 1.0f;
|
||||||
if (pmaVertexColors) {
|
if (pmaVertexColors) {
|
||||||
color.a = (byte)(skeletonA * slot.a * c.a * 255);
|
float colorA = skeletonA * slot.a * c.a;
|
||||||
|
color.a = (byte)(colorA * 255);
|
||||||
color.r = (byte)(skeletonR * slot.r * c.r * color.a);
|
color.r = (byte)(skeletonR * slot.r * c.r * color.a);
|
||||||
color.g = (byte)(skeletonG * slot.g * c.g * color.a);
|
color.g = (byte)(skeletonG * slot.g * c.g * color.a);
|
||||||
color.b = (byte)(skeletonB * slot.b * c.b * color.a);
|
color.b = (byte)(skeletonB * slot.b * c.b * color.a);
|
||||||
@ -576,6 +577,9 @@ namespace Spine.Unity {
|
|||||||
else
|
else
|
||||||
color.a = 0;
|
color.a = 0;
|
||||||
}
|
}
|
||||||
|
else if (canvasGroupTintBlack) { // other blend modes
|
||||||
|
tintBlackAlpha = colorA;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
color.a = (byte)(skeletonA * slot.a * c.a * 255);
|
color.a = (byte)(skeletonA * slot.a * c.a * 255);
|
||||||
color.r = (byte)(skeletonR * slot.r * c.r * 255);
|
color.r = (byte)(skeletonR * slot.r * c.r * 255);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user