提交 f5bf93fc 编写于 作者: Y yomboprime

Set depthWrite so lines are not occluded by transparent meshes

上级 51a9f30c
......@@ -1273,6 +1273,7 @@ THREE.LDrawLoader = ( function () {
material.transparent = isTransparent;
material.premultipliedAlpha = true;
material.opacity = alpha;
material.depthWrite = ! isTransparent;
material.polygonOffset = true;
material.polygonOffsetFactor = 1;
......@@ -1291,7 +1292,8 @@ THREE.LDrawLoader = ( function () {
edgeMaterial = new THREE.LineBasicMaterial( {
color: edgeColour,
transparent: isTransparent,
opacity: alpha
opacity: alpha,
depthWrite: ! isTransparent
} );
edgeMaterial.userData.code = code;
edgeMaterial.name = name + " - Edge";
......@@ -1308,7 +1310,9 @@ THREE.LDrawLoader = ( function () {
opacity: {
value: alpha
}
}
},
transparent: isTransparent,
depthWrite: ! isTransparent
} );
edgeMaterial.userData.conditionalEdgeMaterial.userData.canHaveEnvMap = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册