Skip to content

Commit 3ebef6c

Browse files
committed
Merge pull request godotengine#91372 from clayjohn/RS-blend-shape-tangent
Enable tangents in blend shape format when using normals
2 parents 0e0ef3c + e6f55a5 commit 3ebef6c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

servers/rendering_server.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,10 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa
12261226
bsformat |= (1 << j);
12271227
}
12281228
}
1229+
if (bsformat & RS::ARRAY_FORMAT_NORMAL) {
1230+
// We must use tangents if using normals.
1231+
bsformat |= RS::ARRAY_FORMAT_TANGENT;
1232+
}
12291233

12301234
ERR_FAIL_COND_V_MSG(bsformat != (format & RS::ARRAY_FORMAT_BLEND_SHAPE_MASK), ERR_INVALID_PARAMETER, "Blend shape format must match the main array format for Vertex, Normal and Tangent arrays.");
12311235
}

0 commit comments

Comments
 (0)