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

WebGLRenderer: Moved MeshFaceMaterial handling inside renderBufferDirect.

上级 16bf2e19
......@@ -871,6 +871,20 @@ THREE.WebGLRenderer = function ( parameters ) {
this.renderBufferDirect = function ( camera, lights, fog, material, object ) {
if ( material instanceof THREE.MeshFaceMaterial ) {
var materials = material.materials;
for ( var j = 0, jl = materials.length; j < jl; j ++ ) {
_this.renderBufferDirect( camera, lights, fog, materials[ j ], object );
}
return;
}
if ( material.visible === false ) return;
setMaterial( material );
......@@ -1808,20 +1822,6 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( overrideMaterial === null ) material = object.material;
if ( material instanceof THREE.MeshFaceMaterial ) {
var materials = material.materials;
for ( var j = 0, jl = materials.length; j < jl; j ++ ) {
_this.renderBufferDirect( camera, lights, fog, materials[ j ], object );
}
continue;
}
_this.renderBufferDirect( camera, lights, fog, material, object );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册