I get dark areas when rendering here is a sample of atlas file
size:1024,1024
filter:Linear,Linear
pma:true
and the code is this:
github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-sdl/example/main.cpp
problem footage:
I get dark areas when rendering here is a sample of atlas file
size:1024,1024
filter:Linear,Linear
pma:true
and the code is this:
github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-sdl/example/main.cpp
problem footage:
The dark borders around transparent areas in your Spine-SDL rendering are likely due to the use of premultiplied alpha (PMA) in your atlas file. The pma:true
setting in your atlas file indicates that premultiplied alpha is enabled. However, the spine-sdl runtime does not support atlases exported using premultiplied alpha. To resolve this issue, you should export your texture atlases without premultiplied alpha. You can do this by opening the Texture Packer Settings window in Spine and unchecking the Premultiply alpha option before exporting your atlases.
Spinebot Sadly I only have the .atlas.txt and .skel.bytes and .png not the source file I saw when viewing the file works fine in here Spine Viewer Online
Ian It is possible to unpack and repack the texture without premultiplied alpha. The following article on our blog should help you with this procedure: https://esotericsoftware.com/blog/Importing-skeleton-data
Ian As described in the Exporting for SDL section of the documentation, the spine-sdl runtime does not currently support textures exported using pre-multiplied alpha. So if you want to use the skeleton, you will need to repack the textures without pre-multiplied alpha.
Can I ask you if there is a way I could make a custom one for it.
Yes, you can customize the Spine Runtimes to suit your needs. To customize the Runtime, you may find the general Spine Runtime Guide helpful: https://esotericsoftware.com/spine-runtimes-guide
and also what kind of runtime support it?
If you mean support for pre-multiplied alpha textures, there are many runtimes that support this. However, I do not know enough about your requirements to know which one to recommend. Among the lightweight runtimes, for example, spine-pixi supports them.
Can I ask you if there is a way I could make a custom one for it. and also what kind of runtime support it?
It is not always possible to support pre-multiplied alpha textures later, but in many cases it is unlikely that they will be supported later. In most cases, it is very difficult to support pre-multiplied alpha textures due to the nature of the engine or library. If the version of the engine or the library itself is upgraded and easier to implement, it may be supported.
spine-sdl does already support premultiplied alpha. You just need to set SkeletonDrawable::usePremultipliedAlpha = true
. The drawable currently does not interpret the flag in the atlas.