提交 fd18fe4f 编写于 作者: A Anton

fixed issue with rendering meshes are containing instancing geometry and MeshFaceMaterail

上级 10b1f405
......@@ -867,7 +867,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( geometry instanceof THREE.InstancedBufferGeometry && geometry.maxInstancedCount > 0 ) {
renderer.renderInstances( geometry );
renderer.renderInstances( geometry, drawStart, drawCount );
} else {
......
......@@ -40,7 +40,7 @@ THREE.WebGLIndexedBufferRenderer = function ( _gl, extensions, _infoRender ) {
}
function renderInstances( geometry ) {
function renderInstances( geometry, start, count ) {
var extension = extensions.get( 'ANGLE_instanced_arrays' );
......@@ -53,7 +53,7 @@ THREE.WebGLIndexedBufferRenderer = function ( _gl, extensions, _infoRender ) {
var index = geometry.index;
extension.drawElementsInstancedANGLE( mode, index.array.length, type, 0, geometry.maxInstancedCount );
extension.drawElementsInstancedANGLE( mode, count, type, start * size, geometry.maxInstancedCount );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册