mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-23 08:34:14 -05:00
Deconflate transparent and doubleSideMaterial
This commit is contained in:
parent
fba3cdf4e9
commit
44e76de7be
@ -846,19 +846,14 @@ function createSpecularGlossinessMaterial(material, options) {
|
||||
} else {
|
||||
const alpha = material.alpha;
|
||||
diffuseFactor[3] = alpha;
|
||||
|
||||
if (options.doubleSidedMaterial) {
|
||||
transparent = true;
|
||||
} else {
|
||||
transparent = alpha < 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
if (defined(diffuseTexture)) {
|
||||
transparent = transparent || diffuseTexture.transparent;
|
||||
}
|
||||
|
||||
const doubleSided = transparent;
|
||||
const doubleSided = transparent || options.doubleSidedMaterial;
|
||||
const alphaMode = transparent ? "BLEND" : "OPAQUE";
|
||||
|
||||
return {
|
||||
@ -932,19 +927,14 @@ function createMetallicRoughnessMaterial(material, options) {
|
||||
} else {
|
||||
const alpha = material.alpha;
|
||||
baseColorFactor[3] = alpha;
|
||||
|
||||
if (options.doubleSidedMaterial) {
|
||||
transparent = true;
|
||||
} else {
|
||||
transparent = alpha < 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
if (defined(baseColorTexture)) {
|
||||
transparent = transparent || baseColorTexture.transparent;
|
||||
}
|
||||
|
||||
const doubleSided = transparent;
|
||||
const doubleSided = transparent || options.doubleSidedMaterial;
|
||||
const alphaMode = transparent ? "BLEND" : "OPAQUE";
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user