nesrak1 / UABEA

c# uabe for newer versions of unity
MIT License
1.21k stars 152 forks source link

ETC2 texture format doesn't support partial alpha #341

Open linrjun opened 6 months ago

linrjun commented 6 months ago

hi, excuse me if I chose a wrong issue type. I'm currently workign on some spine modding for a unity game. A weird thing is that some png imported with uabe works fine in game, but with uabea it will have white margins. is ther any setting difference between them? the game i'm working on has recently updated its unity version so UABE is no longer working, that's why I really want to figure out what's behind this. many thanks!

nesrak1 commented 6 months ago

I'm not sure what you mean by "white margins". A picture might help? Some details about the image could help too.

linrjun commented 6 months ago

sorry to waste your time but I've now solved the problem. I guess it's because when an asset bundle is loaded, the tex plugin will recognize its texture format and set it as the default option for the tex loader? then I found with ETC2_RGBA8 my mod will have white margins just like texutre without premultipled alpha channel. But when I manually set it to ASTC_RGB_4x4 (copied from other working mods) it's perfectly working now.

image import image with ETC2_RGBA8 image import image with ASTC_RGB_4x4

nesrak1 commented 6 months ago

I'm in the process of swapping out the library used for texture encoding which might fix this problem at the same time. I'm pretty sure ETC2_RGBA supports partial alpha, so I don't know why you aren't seeing it in-game that way.