atteneder / KtxUnity

Load KTX and Basis Universal textures at runtime
Apache License 2.0
215 stars 42 forks source link

ScriptedImporter textures always display as opaque #64

Closed hybridherbst closed 1 year ago

hybridherbst commented 2 years ago

The regular texture importer is able to show textures as opaque or transparent based on the "alphaIsTransparency" option; however, it seems that textures are always displayed as opaque (with separately selectable A channel) in the KtxImporter textures.

RGB | A image image

Regular texture importer for same file shows transparency image

atteneder commented 2 years ago

Thanks for reporting!

Good news: Doing this in KtxImporter.OnImportAsset seems to bring the checkerboard background.

result.texture.alphaIsTransparency = true;

On regluar TextureImporters this would not only show the checkerboard/alpha blending, but enable some color filtering (see details), but I assume it does not apply here.

So I assume this does no harm and I'd simply go with this solution.

Or do you think there has to be a dedicated checkbox in the settings?

hybridherbst commented 2 years ago

Oh, great if that's all that's needed :)