mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
Fix incorrect vertex data size calculation in ImmediateMesh
This commit is contained in:
parent
b931a6e5ce
commit
b588d1ab8d
@ -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++) {
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user