未验证 提交 d9fa7142 编写于 作者: L lk-lkaz 提交者: GitHub

Fix uniforms to support fog

Fixed uniforms of conditionalEdgeMaterial to support fog.
I think this is a bug, because its VertShader and FragShader is already support fog.
上级 10710ebf
......@@ -998,14 +998,18 @@ THREE.LDrawLoader = ( function () {
edgeMaterial.userData.conditionalEdgeMaterial = new THREE.ShaderMaterial( {
vertexShader: conditionalLineVertShader,
fragmentShader: conditionalLineFragShader,
uniforms: {
diffuse: {
value: new THREE.Color( edgeColour )
},
opacity: {
value: alpha
uniforms: THREE.UniformsUtils.merge( [
THREE.UniformsLib.fog,
{
diffuse: {
value: new THREE.Color( edgeColour )
},
opacity: {
value: alpha
}
}
},
] ),
fog: true,
transparent: isTransparent,
depthWrite: ! isTransparent
} );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册