Deconflate transparent and doubleSideMaterial

This commit is contained in:
Sean Lilley 2023-10-03 09:27:12 -04:00
parent fba3cdf4e9
commit 44e76de7be

View File

@ -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 {