Skip to content

Commit 546c9f8

Browse files
committed
Fix double premultiplication.
1 parent fc40ca5 commit 546c9f8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

spine-ts/spine-construct3/spine-construct3-lib/src/C3SkeletonRenderer.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,10 @@ abstract class C3SkeletonRenderer<
7979

8080
const color = colors[i];
8181
const colorDst = i * 4;
82-
const alpha = (color >>> 24) * inv255;
83-
const inv255Alpha = alpha * inv255;
84-
c3colors[colorDst] = (color >>> 16 & 0xFF) * inv255Alpha;
85-
c3colors[colorDst + 1] = (color >>> 8 & 0xFF) * inv255Alpha;
86-
c3colors[colorDst + 2] = (color & 0xFF) * inv255Alpha;
87-
c3colors[colorDst + 3] = alpha;
82+
c3colors[colorDst] = (color >>> 16 & 0xFF) * inv255;
83+
c3colors[colorDst + 1] = (color >>> 8 & 0xFF) * inv255;
84+
c3colors[colorDst + 2] = (color & 0xFF) * inv255;
85+
c3colors[colorDst + 3] = (color >>> 24) * inv255;
8886
}
8987

9088
this.renderSkeleton(

0 commit comments

Comments
 (0)