We're trying to implement a multiple texture size setup. for different devices.
We noticed that the atlas PNG from spine export have premultiplied alpha.
(means i can't just simply resize the texture in photoshop)

We also tried to change the shader to Default/Sprite. (using photoshop exported images) But we start noticing artifacts created due to it not being premultiplied alpha.

We also tried changing the scale of the export options in spine to get a smaller size asset (it did not work because spine repacked the parts in different places although we scaled down as 50% size)

Is there any advice on how we can achieve this?

Posts: 2


You can export multiple atlas sizes from Spine's texture packer. You just need to fill out the "Scale" fields with the scales you want.
For example:
"1.0" "0.5" "0.25"

So that it'll export a 100%, 50%, and 25% scaled atlases.
You can type a custom suffix to the atlas file names per scale so you can identify them.

For more info: Texture Packing - Spine User Guide: Output

Note that separate atlases means they need to be loaded after you set the correct atlas. You can't just replace the texture or the atlas file after the fact. It needs to load the new atlas regions when you switch.

As a different option, you can DISABLE premultiply alpha from the texture packer, then use a straight alpha shader.
Note that the Spine-Unity for Spine 3.7 shaders have changed so they can also have straight alpha variants (that behave like Spine/Default) through a checkbox labeled "straight alpha input".

Those do work just fine if you copy them to your Spine 3.6 project. For example: spine-runtimes/Spine-Skeleton.shader at 3.7-beta
User avatar

Posts: 5009

Return to Unity