From e438085eec581c675415d1e41d7e00f9d668720e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E?= <908087098@qq.com> Date: Tue, 9 Jan 2024 12:11:08 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=92=99=E7=9A=AE=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E5=A4=9A=E4=B8=AA=E6=B8=B2=E6=9F=93pass=E6=97=B6?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=B8=B2=E6=9F=93=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../d3/RenderObjs/RenderObj/SkinRenderElementOBJ.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/layaAir/laya/d3/RenderObjs/RenderObj/SkinRenderElementOBJ.ts b/src/layaAir/laya/d3/RenderObjs/RenderObj/SkinRenderElementOBJ.ts index 04f690e3e6..01efc33765 100644 --- a/src/layaAir/laya/d3/RenderObjs/RenderObj/SkinRenderElementOBJ.ts +++ b/src/layaAir/laya/d3/RenderObjs/RenderObj/SkinRenderElementOBJ.ts @@ -20,13 +20,11 @@ export class SkinRenderElementOBJ extends RenderElementOBJ { if (!this.skinnedData) return; this._geometry.bufferState.bind(); - for (var i: number = 0, n: number = length; i < n; i++) { - for (var j = 0, m = this._geometry.drawParams.length / 2; j < m; j++) { - var subSkinnedDatas: Float32Array = this.skinnedData[j]; - shaderIns.uploadCustomUniform(SkinnedMeshSprite3D.BONES, subSkinnedDatas); - var offset = j * 2; - LayaGL.renderDrawContext.drawElements((this._geometry as RenderGeometryElementOBJ)._glmode, element[offset + 1], (this._geometry as RenderGeometryElementOBJ)._glindexFormat, element[offset]); - } + for (var j = 0, m = this._geometry.drawParams.length / 2; j < m; j++) { + var subSkinnedDatas: Float32Array = this.skinnedData[j]; + shaderIns.uploadCustomUniform(SkinnedMeshSprite3D.BONES, subSkinnedDatas); + var offset = j * 2; + LayaGL.renderDrawContext.drawElements((this._geometry as RenderGeometryElementOBJ)._glmode, element[offset + 1], (this._geometry as RenderGeometryElementOBJ)._glindexFormat, element[offset]); } } } \ No newline at end of file