From bf77016c8a3cc9a8ff4c57c0fc32a4255006391b Mon Sep 17 00:00:00 2001 From: reduz Date: Wed, 16 Dec 2020 11:07:08 -0300 Subject: Reimplement skeletons and blend shapes Uses compute shaders, which only once, on demand, and all in parallel. --- scene/resources/surface_tool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scene/resources/surface_tool.cpp') diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 129f8a48ce..772b54bc53 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -541,7 +541,7 @@ Array SurfaceTool::commit_to_arrays() { ERR_CONTINUE(v.bones.size() != count); for (int j = 0; j < count; j++) { - w[idx + j] = v.bones[j]; + w[idx * count + j] = v.bones[j]; } } @@ -561,7 +561,7 @@ Array SurfaceTool::commit_to_arrays() { ERR_CONTINUE(v.weights.size() != count); for (int j = 0; j < count; j++) { - w[idx + j] = v.weights[j]; + w[idx * count + j] = v.weights[j]; } } -- cgit v1.2.3