Browse Source

Fix bugs. Now mesh shading appears to be working

Panagiotis Christopoulos Charitos 2 years ago
parent
commit
4df117c071
1 changed files with 2 additions and 2 deletions
  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 =