mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[cocos2dx] Fixes #1229, tint black calculation was incorrect.
This commit is contained in:
parent
044f0a764f
commit
a4a36d81a3
@ -405,13 +405,13 @@ namespace spine {
|
|||||||
}
|
}
|
||||||
float multiplier = _premultipliedAlpha ? alpha : 255;
|
float multiplier = _premultipliedAlpha ? alpha : 255;
|
||||||
|
|
||||||
float red = nodeColor.r * _skeleton->color.r * slot->color.r * multiplier;
|
float red = nodeColor.r * _skeleton->color.r * color.r * multiplier;
|
||||||
float green = nodeColor.g * _skeleton->color.g * slot->color.g * multiplier;
|
float green = nodeColor.g * _skeleton->color.g * color.g * multiplier;
|
||||||
float blue = nodeColor.b * _skeleton->color.b * slot->color.b * multiplier;
|
float blue = nodeColor.b * _skeleton->color.b * color.b * multiplier;
|
||||||
|
|
||||||
color.r = red * color.r;
|
color.r = red * slot->color.r;
|
||||||
color.g = green * color.g;
|
color.g = green * slot->color.g;
|
||||||
color.b = blue * color.b;
|
color.b = blue * slot->color.b;
|
||||||
color.a = alpha;
|
color.a = alpha;
|
||||||
|
|
||||||
if (slot->darkColor) {
|
if (slot->darkColor) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user