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

WebGLRenderer: Moved MeshFaceMaterial out of renderBufferDirect.

上级 33b37b79
......@@ -775,24 +775,6 @@ THREE.WebGLRenderer = function ( parameters ) {
this.renderBufferDirect = function ( camera, lights, fog, geometry, material, object ) {
if ( material instanceof THREE.MeshFaceMaterial ) {
var materials = material.materials;
for ( var i = 0, il = materials.length; i < il; i ++ ) {
material = materials[ i ];
if ( material === null || material.visible === false ) continue;
_this.renderBufferDirect( camera, lights, fog, geometry, material, object );
}
return;
}
setMaterial( material );
var program = setProgram( camera, lights, fog, material, object );
......@@ -1737,6 +1719,22 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( overrideMaterial === undefined ) material = object.material;
if ( material instanceof THREE.MeshFaceMaterial ) {
var materials = material.materials;
for ( var j = 0, jl = materials.length; j < jl; j ++ ) {
material = materials[ j ];
if ( material === null || material.visible === false ) continue;
_this.renderBufferDirect( camera, lights, fog, geometry, material, object );
}
}
_this.renderBufferDirect( camera, lights, fog, geometry, material, object );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册