summaryrefslogtreecommitdiffstats
path: root/scene/resources/immediate_mesh.cpp
diff options
context:
space:
mode:
authorkleonc <9283098+kleonc@users.noreply.github.com>2023-10-10 13:23:53 +0200
committerkleonc <9283098+kleonc@users.noreply.github.com>2023-10-10 13:23:53 +0200
commitb588d1ab8d6e7f49f2d7818e3dd3892301b6ad4e (patch)
treee29dfcabe41a7ba69d55e53e4cc52013ba904b8c /scene/resources/immediate_mesh.cpp
parentb931a6e5ce9897b5716923680dc1c6618312ab3e (diff)
downloadredot-engine-b588d1ab8d6e7f49f2d7818e3dd3892301b6ad4e.tar.gz
Fix incorrect vertex data size calculation in ImmediateMesh
Diffstat (limited to 'scene/resources/immediate_mesh.cpp')
-rw-r--r--scene/resources/immediate_mesh.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/immediate_mesh.cpp b/scene/resources/immediate_mesh.cpp
index dbc74d7c87..0112ffd452 100644
--- a/scene/resources/immediate_mesh.cpp
+++ b/scene/resources/immediate_mesh.cpp
@@ -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++) {
{