corpvs

使用的是WEBGL,
SPINE版本是3.6.53
做的是框体透明的桌宠,在黑色区域一切正常,但是当程序移动到白色底色区域时,人物眼睛等有alpha信息的地方,会整个透明掉.
请问是什么原因导致的呢?有没有什么办法可以解决呢,谢谢.


1.PNG

2.PNG
You do not have the required permissions to view the files attached to this post.
corpvs
  • Posts: 2

Mario

似乎您在导出端混合了预乘alpha,而在WebGL运行时中未使用预乘alpha。 我建议导出时启用预乘Alpha,并在WebGL运行时中启用预乘Alpha。 这可以在WebGL运行时中通过将true传递给SkeletonRenderer.drawSkeleton()方法来完成,如下所示:https://github.com/EsotericSoftware/spine-runtimes/blob/3.8/spine-ts/ webgl / tests / test-mix-and-match.html#L106

It looks like you are mixing pre-multiplied alpha on the export side, with not using pre-multiplied alpha in the WebGL runtime. I would suggest to export with pre-multiplied alpha on, and enabling pre-multiplied alpha in the WebGL runtime. This can be done in the WebGL runtime by passing true to the SkeletonRenderer.drawSkeleton() method, as shown here: spine-runtimes/test-mix-and-match.html at 3.8
User avatar
Mario

Mario
  • Posts: 2364

corpvs

问题解决了。感谢!
corpvs
  • Posts: 2


Return to 中国Spine用户