fix(skins): translucency issues with outer layer (#6345)

fix(skins): translucency issues with outer layer in main renderer
This commit is contained in:
Calum H.
2026-06-10 14:28:21 +01:00
committed by GitHub
parent 180cef6eaa
commit 98b1730e19
2 changed files with 3 additions and 2 deletions
@@ -32,7 +32,7 @@ function configureSkinPreviewMesh(mesh: THREE.Mesh) {
materials.forEach((material) => {
if (!(material instanceof THREE.MeshStandardMaterial) || material.name === 'cape') return
material.transparent = false
material.transparent = isSkinLayer
material.alphaTest = 0.1
material.depthTest = true
material.depthWrite = true
@@ -157,6 +157,7 @@ export function applyTexture(model: THREE.Object3D, texture: THREE.Texture): voi
model.traverse((child) => {
if ((child as THREE.Mesh).isMesh) {
const mesh = child as THREE.Mesh
const isSkinLayer = mesh.name.endsWith('_Layer')
const materials = Array.isArray(mesh.material) ? mesh.material : [mesh.material]
materials.forEach((mat: THREE.Material) => {
@@ -168,7 +169,7 @@ export function applyTexture(model: THREE.Object3D, texture: THREE.Texture): voi
flatShading: true,
side: THREE.FrontSide,
toneMapped: false,
transparent: false,
transparent: isSkinLayer,
})
setCommonMaterialProperties(mat)