Fix incorrect vertex data size calculation in ImmediateMesh

This commit is contained in:
kleonc 2023-10-10 13:23:53 +02:00
parent b931a6e5ce
commit b588d1ab8d

View File

@ -175,7 +175,7 @@ void ImmediateMesh::surface_end() {
AABB aabb;
{
surface_vertex_create_cache.resize(vertex_stride * vertices.size());
surface_vertex_create_cache.resize((vertex_stride + normal_tangent_stride) * vertices.size());
uint8_t *surface_vertex_ptr = surface_vertex_create_cache.ptrw();
for (uint32_t i = 0; i < vertices.size(); i++) {
{