Closed Retro52 closed 2 months ago
Oh wow, you are the first person to run into this after years of this early out existing! I'll have to hunt this down in all implementations now.
Thank you for reporting even though you are not using SkeletonRenderer
yourself!
Hi,
Our team uses the spine-cpp runtime in our engine. Recently, we've updated our runtime from
spine-c
version 3.8.99 tospine-cpp
version 4.2.36. While porting the code, it became clear that it would be easier to rewrite it from scratch.For the most part, I used the
spine-sfml
C++ implementation as a reference. However, since we use custom rendering code, we cannot use SkeletonRenderer directly, but I used it as a guide for porting the rendering logic. To my surprise, after testing some animations re-exported for version 4.2, the new implementation had an issue with clipping: some masks were completely skipped. After some investigation, it became clear that the problem was along these lines:Some of our clipping attachments were attached to slots with an alpha value equal to 0, so they were skipped due to the early-out condition, and hence clipping did not work properly. I added a temporary workaround for this issue by checking the attachment type before continuing to the next attachment, but it would be nice to see a standardized solution, especially for those who use
SkeletonRenderer
as their main renderer.I assume that my workaround is correct because it mimics the Spine editor behavior for the animation. Unfortunately, I cannot provide an example animation, as it was created within the studio, and I am not allowed to publish it.