Closed likangning93 closed 6 years ago
Opening this as an issue instead of a PR because I don't know if there's a case where users would want single channel textures to be interpreted as alpha instead of luminance for gltf 1.0.
I can't think of a use case. It should be fine to always set the format to RGBA.
It should be fine to always set the format to RGBA.
We just need luminance for single-channel instead of alpha, I think the other cases should be fine. I'll open a PR soon.
See https://github.com/AnalyticalGraphicsInc/obj2gltf/blob/1.0/lib/loadImage.js#L99.
When using single-channel grayscale textures this can lead to unintended results in Cesium:
Expected:
Actual: