在使用addIncludedOnlyMesh(mesh)将某些材质变为发光材质时,会导致其他没有自发光属性的材质也受到影响,可能会导致以下效果。
将墙体也添自发光属性,并将emissiveColor设置为黑色
if(e.name === '1'){ // 字母的mesh
glow.addIncludedOnlyMesh(e)
e.material.emissiveColor = new BABYLON.Color3(0.8, 0.8, 1)
}
if(e.name === '2'){ // 墙体的mesh
glow.addIncludedOnlyMesh(e)
e.material.emissiveColor = new BABYLON.Color3(0, 0, 0)
}