提交 ff007f7a 编写于 作者: M Mr.doob

Merge pull request #7025 from box/meshfacematerial_program_fix

Adding logic to assign material.program for MeshFaceMaterials
......@@ -1311,10 +1311,21 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( material !== null && material.visible === true ) {
if ( properties.get( material ) ) {
if ( material instanceof THREE.MeshFaceMaterial ) {
for ( var i = 0, l = material.materials.length; i < l; i ++ ) {
if ( properties.get( material.materials[ i ] ) ) {
material.program = properties.get( material ).program;
material.materials[ i ].program = properties.get( material.materials[ i ] ).program;
}
}
}
else {
if ( properties.get( material ) ) {
material.program = properties.get( material ).program;
}
}
if ( material.transparent ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册