From e10946ffe6462d7fc4e7f5007a902ee291302521 Mon Sep 17 00:00:00 2001 From: Cheng Liao Date: Mon, 25 Mar 2019 12:17:59 +0800 Subject: [PATCH] fix vertexStride bug --- src/d3/src/laya/d3/graphics/SubMeshStaticBatch.as | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d3/src/laya/d3/graphics/SubMeshStaticBatch.as b/src/d3/src/laya/d3/graphics/SubMeshStaticBatch.as index a031e1da..a61e2b45 100644 --- a/src/d3/src/laya/d3/graphics/SubMeshStaticBatch.as +++ b/src/d3/src/laya/d3/graphics/SubMeshStaticBatch.as @@ -102,7 +102,7 @@ package laya.d3.graphics { var uv1Offset:int = uv1Element ? uv1Element.offset / 4 : -1; var tangentElement:VertexElement = vertexDeclaration.getVertexElementByUsage(VertexMesh.MESH_TANGENT0); var sTangentOffset:int = tangentElement ? tangentElement.offset / 4 : -1; - var bakeVertexFloatCount:int = 18; + var bakeVertexFloatCount:int = _vertexDeclaration.vertexStride / 4; var oriVertexFloatCount:int = vertexDeclaration.vertexStride / 4; var oriVertexes:Float32Array = vertexBuffer.getData() as Float32Array;