Description
In GLTFLoader
we can load standard materials using StandardMaterial
.
However, the alpha channel of its texture doesn't be handled properly, when renderer's alpha is activated.
In OPAQUE
or MASK
material, alpha channels of texture should be negated:
https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#alpha-coverage
Change the material's blend mode to ZERO-ONE (in GLTFLoader) might solve this problem?
This is how it should be (rendered in Unity):
Here's how it looks like in Three.js GLTFLoader:
This is the source code:
https://github.com/FMS-Cat/cube-gradient-alpha
Environment:
- Three.js version: r99
- Browser: Confirmed in Chrome, Firefox, Edge
- OSes: Windows. Has not tested in other env
- Hardware: Probably no requirements