diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index b3efe840b6..0462b1d599 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -934,7 +934,8 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa } } - ERR_FAIL_COND_V_MSG((bsformat & RS::ARRAY_FORMAT_BLEND_SHAPE_MASK) != (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."); + const uint32_t blend_format_mask = RS::ARRAY_FORMAT_VERTEX | RS::ARRAY_FORMAT_NORMAL | RS::ARRAY_FORMAT_TANGENT; + ERR_FAIL_COND_V_MSG((bsformat & blend_format_mask) != (format & blend_format_mask), ERR_INVALID_PARAMETER, "Blend shape format must match the main array format for Vertex, Normal and Tangent arrays."); } }