瀏覽代碼

Fix bugs. Now mesh shading appears to be working

Panagiotis Christopoulos Charitos 2 年之前
父節點
當前提交
4df117c071
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      AnKi/Resource/MeshResource.cpp

+ 2 - 2
AnKi/Resource/MeshResource.cpp

@@ -317,8 +317,8 @@ Error MeshResource::loadAsync(MeshBinaryLoader& loader) const
 					}
 
 					outMeshlet.m_vertexOffsets[U32(stream)] =
-						lod.m_vertexBuffersAllocationToken[stream].getOffset()
-						+ inMeshlet.m_firstVertex * getFormatInfo(kMeshRelatedVertexStreamFormats[stream]).m_texelSize;
+						lod.m_vertexBuffersAllocationToken[stream].getOffset() / getFormatInfo(kMeshRelatedVertexStreamFormats[stream]).m_texelSize
+						+ inMeshlet.m_firstVertex;
 				}
 
 				outMeshlet.m_firstPrimitive =