You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What it says on the tin. If an input COLLADA file has a PNG image with transparency as a texture, the alphaMode property of the resulting GLTF texture is not set. Inspecting the source code, I see that the GLTFMaterial class supports alphaMode and alphaCutoff fields, but that nothing in the COLLADA2GLTF::Writer sets the alphaMode to MASK. I understand it would be annoying to scan each input image to determine if it contains any transparency, but I propose that it might be reasonable to assume a PNG is being used for its transparency, and set alphaMode to MASK any time a PNG is encountered.
If you agree, I'm happy to make a PR for this.
Edit: In addition, it appears this stanza in the input COLLADA model:
What it says on the tin. If an input COLLADA file has a PNG image with transparency as a texture, the
alphaMode
property of the resulting GLTF texture is not set. Inspecting the source code, I see that theGLTFMaterial
class supportsalphaMode
andalphaCutoff
fields, but that nothing in theCOLLADA2GLTF::Writer
sets thealphaMode
toMASK
. I understand it would be annoying to scan each input image to determine if it contains any transparency, but I propose that it might be reasonable to assume a PNG is being used for its transparency, and setalphaMode
toMASK
any time a PNG is encountered.If you agree, I'm happy to make a PR for this.
Edit: In addition, it appears this stanza in the input COLLADA model:
is not triggering this code in
COLLADA2GLTF::Writer
:COLLADA2GLTF/src/COLLADA2GLTFWriter.cpp
Lines 1115 to 1119 in 6e11fe6
The text was updated successfully, but these errors were encountered: