jabuwu / bevy_spine

A Bevy plugin for Spine
https://docs.rs/bevy_spine
Other
84 stars 5 forks source link

Premultiplied alpha support needs work #2

Open jabuwu opened 1 year ago

jabuwu commented 1 year ago

As noted in the PMA shader, some work needs to be done for PMA textures to "just work" in Bevy.

https://github.com/jabuwu/bevy_spine/blob/d97bf2067b86c9de34d0f0daa6c8fde67823e3f9/src/fragment_pma.wgsl

More discussion here: https://github.com/bevyengine/bevy/issues/6315

This issue extends to using linear textures, so, for now, I've added an example showing how to convert all Spine-loaded textures to nearest: https://github.com/jabuwu/bevy_spine/blob/d97bf2067b86c9de34d0f0daa6c8fde67823e3f9/examples/nearest_textures.rs

Of course, nearest textures really aren't ideal either, so for now it might be best to avoid PMA altogether.