{"id":767,"date":"2021-09-06T19:18:31","date_gmt":"2021-09-06T11:18:31","guid":{"rendered":"http:\/\/blog.xrhoujie.com\/?p=767"},"modified":"2021-08-06T19:21:08","modified_gmt":"2021-08-06T11:21:08","slug":"cocos-creator-%e6%80%a7%e8%83%bd%e4%bc%98%e5%8c%96%ef%bc%9adrawcall%e8%bd%ac","status":"publish","type":"post","link":"http:\/\/blog.xrhoujie.com\/?p=767","title":{"rendered":"Cocos Creator \u6027\u80fd\u4f18\u5316\uff1aDrawCall(\u8f6c)"},"content":{"rendered":"<h2 id=\"activity-name\" class=\"rich_media_title\"><\/h2>\n<div id=\"js_tags\" class=\"article-tag__list\" data-len=\"2\"><\/div>\n<div id=\"js_content\" class=\"rich_media_content \">\n<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" data-mpa-powered-by=\"yiban.io\">\n<h1 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u524d\u8a00<\/h1>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728\u6e38\u620f\u5f00\u53d1\u4e2d\uff0cDrawCall \u4f5c\u4e3a\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u6027\u80fd\u6307\u6807\uff0c\u76f4\u63a5\u5f71\u54cd\u6e38\u620f\u7684\u6574\u4f53\u6027\u80fd\u8868\u73b0\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u65e0\u8bba\u662f Cocos Creator\u3001Unity\u3001Unreal \u8fd8\u662f\u5176\u4ed6\u6e38\u620f\u5f15\u64ce\uff0c\u53ea\u8981\u8bf4\u5230\u6e38\u620f\u6027\u80fd\u4f18\u5316\uff0cDrawCall \u90fd\u662f\u7edd\u5bf9\u5c11\u4e0d\u4e86\u7684\u4e00\u9879\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u672c\u6587\u5c06\u4f1a\u4ecb\u7ecd\u4ec0\u4e48\u662f DrawCall\uff0c\u4e3a\u4ec0\u4e48\u8981\u51cf\u5c11 DrawCall \u4ee5\u53ca\u5728 Cocos Creator \u9879\u76ee\u4e2d\u5982\u4f55\u51cf\u5c11 DrawCall \u6765\u63d0\u5347\u6e38\u620f\u6027\u80fd\u3002<\/p>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h1 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6b63\u6587<\/h1>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4ec0\u4e48\u662f DrawCall\uff1f<\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">DrawCall \u4e2d\u6587\u8bd1\u4e3a\u201c\u7ed8\u5236\u8c03\u7528\u201d\u6216\u201c\u7ed8\u56fe\u6307\u4ee4\u201d\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">DrawCall \u662f\u4e00\u79cd\u884c\u4e3a\uff08\u6307\u4ee4\uff09\uff0c\u5373 CPU \u8c03\u7528\u56fe\u5f62 API\uff0c\u547d\u4ee4 GPU \u8fdb\u884c\u56fe\u5f62\u7ed8\u5236\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>DrawCall \u4e00\u822c\u53ef\u4ee5\u7b80\u79f0\u4e3a\u201cDC\u201d\uff0c\u5f53\u7136\u6b64\u201cDC\u201d\u975e\u5f7c\u201cDC\u201d&#8230;<\/p><\/blockquote>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e3a\u4ec0\u4e48\u8981\u51cf\u5c11 DrawCall\uff1f<\/h2>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u53d1\u751f\u4e86\u4ec0\u4e48<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5f53\u6211\u4eec\u5728\u8ba8\u8bba\u51cf\u5c11 DrawCall \u65f6\u6211\u4eec\u5728\u8ba8\u8bba\u4ec0\u4e48\uff1f<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5176\u5b9e\u6211\u4eec\u771f\u6b63\u9700\u8981\u51cf\u5c11\u7684\u5e76\u4e0d\u662f DrawCall \u8fd9\u4e2a\u884c\u4e3a\u672c\u8eab\uff0c\u800c\u662f\u51cf\u5c11\u6bcf\u4e2a DrawCall \u524d\u7f6e\u7684\u4e00\u4e9b\u6d88\u8017\u6027\u80fd\u548c\u65f6\u95f4\u7684\u884c\u4e3a\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u770b\u4e0d\u61c2\uff1f\u5176\u5b9e\u6211\u4e5f\u4e0d\u77e5\u9053\u6211\u5728\u8bf4\u4e9b\u4ec0\u4e48\uff0c\u8fd8\u662f\u63a5\u7740\u770b\u4e0b\u9762\u7684\u5185\u5bb9\u5427 : p<\/p><\/blockquote>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e3e\u4e2a\u6817\u5b50<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u95ee\uff1a\u5c1d\u8bd5\u5728\u4e24\u4e2a\u786c\u76d8\u4e4b\u95f4\u4f20\u8f93\u6587\u4ef6\uff0c<strong>\u300c\u4f20\u8f93 1 \u4e2a 1MB \u7684\u6587\u4ef6\u548c\u4f20\u8f93 1024 \u4e2a 1KB \u7684\u6587\u4ef6\u300d<\/strong>\uff0c\u540c\u6837\u662f\u4f20\u8f93\u4e86\u5171 1MB \u7684\u6587\u4ef6\uff0c<strong>\u300c\u54ea\u4e2a\u66f4\u5feb\uff1f\u300d<\/strong><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u7b54\uff1a<strong>\u300c\u4f20\u8f93 1 \u4e2a 1MB \u7684\u6587\u4ef6\u8981\u6bd4\u4f20\u8f93 1024 \u4e2a 1KB \u7684\u6587\u4ef6\u8981\u5feb\u5f97\u591a\u5f97\u591a\u300d<\/strong>\u3002\u56e0\u4e3a\u5728\u6bcf\u4e00\u4e2a\u6587\u4ef6\u4f20\u8f93\u524d\uff0cCPU \u90fd\u9700\u8981\u505a\u8bb8\u591a\u989d\u5916\u7684\u5de5\u4f5c\u6765\u4fdd\u8bc1\u6587\u4ef6\u80fd\u591f\u6b63\u786e\u5730\u88ab\u4f20\u8f93\uff0c\u800c\u8fd9\u4e9b\u989d\u5916\u5de5\u4f5c\u9020\u6210\u4e86\u5927\u91cf\u989d\u5916\u7684\u6027\u80fd\u548c\u65f6\u95f4\u5f00\u9500\uff0c\u5bfc\u81f4\u4f20\u8f93\u901f\u5ea6\u4e0b\u964d\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u56de\u5230\u6e32\u67d3<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u56fe\u5f62\u6e32\u67d3\u7ba1\u7ebf\u7684\u5927\u81f4\u6d41\u7a0b\u5982\u4e0b\uff1a<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\"><\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong>\u300c\u4ece\u56fe\u4e2d\u53ef\u4ee5\u770b\u5230\u5728\u6e32\u67d3\u7ba1\u7ebf\u4e2d\uff0c\u5728\u6bcf\u4e00\u6b21 DrawCall \u524d\uff0cCPU \u90fd\u9700\u8981\u505a\u4e00\u7cfb\u5217\u51c6\u5907\u5de5\u4f5c\uff0c\u624d\u80fd\u8ba9 GPU \u6b63\u786e\u6e32\u67d3\u51fa\u56fe\u50cf\u3002\u300d<\/strong><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong>\u300c\u800c CPU \u7684\u6bcf\u4e00\u6b21\u5185\u5b58\u663e\u5b58\u8bfb\u5199\u3001\u6570\u636e\u5904\u7406\u548c\u6e32\u67d3\u72b6\u6001\u5207\u6362\u90fd\u4f1a\u5e26\u6765\u4e00\u5b9a\u7684\u6027\u80fd\u548c\u65f6\u95f4\u6d88\u8017\u3002\u300d<\/strong><\/p>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5230\u5e95\u662f\u8c01\u7684\u9505\uff1f<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e00\u822c\u6765\u8bf4 GPU \u6e32\u67d3\u56fe\u50cf\u7684\u901f\u5ea6\u5176\u5b9e\u662f\u975e\u5e38\u5feb\u7684\uff0c\u7ed8\u5236 100 \u4e2a\u4e09\u89d2\u5f62\u548c\u7ed8\u5236 1000 \u4e2a\u4e09\u89d2\u5f62\u6240\u6d88\u8017\u7684\u65f6\u95f4\u6ca1\u5dee\u591a\u5c11\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4f46\u662f CPU \u7684\u5185\u5b58\u663e\u5b58\u8bfb\u5199\u3001\u6570\u636e\u5904\u7406\u548c\u6e32\u67d3\u72b6\u6001\u5207\u6362\u76f8\u5bf9\u4e8e GPU \u6e32\u67d3\u6765\u8bf4\u662f<strong>\u300c\u975e\u5e38\u975e\u5e38\u6162\u300d<\/strong>\u7684\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5b9e\u9645\u7684\u74f6\u9888\u5728\u4e8e CPU \u8fd9\u8fb9\uff0c\u5927\u91cf\u7684 DrawCall \u4f1a\u8ba9 CPU \u5fd9\u5230\u7126\u5934\u70c2\u989d\u6655\u5934\u8f6c\u5411\u4e0d\u53ef\u5f00\u4ea4\uff0c\u800c GPU \u5927\u90e8\u5206\u65f6\u95f4\u90fd\u5728\u6478\u9c7c\uff0c\u662f\u5bfc\u81f4\u6e38\u620f\u6027\u80fd\u4e0b\u964d\u7684\u4e3b\u8981\u539f\u56e0\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u6240\u4ee5 DrawCall \u8fd9\u73a9\u610f\u8d8a\u5c11\u8d8a\u597d~<\/p><\/blockquote>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5982\u4f55\u51cf\u5c11 DrawCall\uff1f<\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728\u6e38\u620f\u8fd0\u884c\u65f6\u5f15\u64ce\u662f\u6309\u7167\u8282\u70b9\u5c42\u7ea7\u987a\u5e8f\u4ece\u4e0a\u5f80\u4e0b\u7531\u6d45\u5230\u6df1\u8fdb\u884c\u6e32\u67d3\u7684\uff0c\u7406\u8bba\u4e0a\u6bcf\u6e32\u67d3\u4e00\u5f20\u56fe\u50cf\uff08\u6587\u672c\u6700\u7ec8\u4e5f\u662f\u56fe\u50cf\uff09\u90fd\u9700\u8981\u4e00\u6b21 DrawCall\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u65e2\u7136\u5982\u6b64\uff0c\u53ea\u8981\u6211\u4eec\u60f3\u529e\u6cd5\u5c06\u5c3d\u53ef\u80fd\u591a\u7684\u56fe\u50cf\u5728\u4e00\u6b21 DrawCall \u4e2d\u6e32\u67d3\u51fa\u6765\uff08\u4e5f\u5c31\u662f\u201c\u6e32\u67d3\u5408\u6279\u201d\uff09\uff0c\u5c31\u53ef\u4ee5\u5c3d\u91cf\u5c11\u53bb\u8c03\u7528 CPU\uff0c\u4ece\u800c\u51cf\u5c11 DrawCall\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u7b80\u5355\u70b9\uff0c\u5c31\u662f\u51cf\u5c11\u8ba9 CPU \u5de5\u4f5c\u7684\u6b21\u6570\uff0c\u4f46\u662f\u6bcf\u6b21\u90fd\u591a\u7ed9\u70b9\u6d3b\uff0c\u4e0d\u5c31\u53ef\u4ee5\u7701\u53bb\u4e00\u4e9b\u201cCPU \u51c6\u5907\u5de5\u5177\u7136\u540e\u5de5\u4f5c\u201d\u548c\u201c\u5de5\u4f5c\u7ed3\u675f\u53eb GPU \u52a0\u5de5\u201d\u7684\u6b65\u9aa4\u4e86\u561b\uff0c\u4ee3\u4ef7\u5c31\u662f\u6bcf\u6b21\u5de5\u4f5c\u7684\u65f6\u95f4\u4f1a\u53d8\u957f~<\/p><\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u660e\u767d\u4e86\u8fd9\u4e2a\u539f\u7406\u4e4b\u540e\uff0c\u4e0b\u9762\u8ba9\u6211\u4eec\u770b\u770b\u5728\u5b9e\u9645\u6e38\u620f\u5f00\u53d1\u4e2d\u5e94\u8be5\u5982\u4f55\u64cd\u4f5c\u5427\u3002<\/p>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u9759\u6001\u5408\u56fe<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u9759\u6001\u5408\u56fe\u5c31\u662f\u5728\u5f00\u53d1\u65f6<strong>\u300c\u5c06\u4e00\u7cfb\u5217\u788e\u56fe\u6574\u5408\u6210\u4e00\u5f20\u5927\u56fe\u300d<\/strong>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u56fe\u96c6\u5bf9\u4e8e DrawCall \u4f18\u5316\u6765\u8bf4\u975e\u5e38\u91cd\u8981\uff0c\u4f46\u662f\u5e76\u4e0d\u662f\u8bf4\u6211\u4eec\u628a\u6240\u6709\u56fe\u7247\u7edf\u7edf\u6253\u6210\u56fe\u96c6\u5c31\u4e07\u4e8b\u5927\u5409\u4e86\uff0c\u8fd9\u91cc\u9762\u4e5f\u6709\u5b83\u7684\u95e8\u9053\uff0c\u80e1\u4e71\u6253\u56fe\u96c6\u7684\u8bdd\u8bf4\u4e0d\u5b9a\u8fd8\u4f1a\u53d8\u6210\u8d1f\u4f18\u5316\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6700\u91cd\u8981\u7684\u662f<strong>\u300c\u5c3d\u91cf\u5c06\u5904\u4e8e\u540c\u4e00\u754c\u9762\uff08UI\uff09\u4e0b\u7684\u76f8\u90bb\u4e14\u6e32\u67d3\u72b6\u6001\u76f8\u540c\u7684\u788e\u56fe\u6253\u5305\u6210\u56fe\u96c6\u300d<\/strong>\uff0c\u624d\u80fd\u8fbe\u5230\u51cf\u5c11 DrawCall \u7684\u76ee\u7684\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u8fd8\u8bb0\u5f97\u6e38\u620f\u6e32\u67d3\u65f6\u662f\u6309\u987a\u5e8f\u6e32\u67d3\u7684\u5417\uff0c\u6240\u4ee5\u201c\u76f8\u90bb\u201d\u5f88\u5173\u952e\uff01\u8981\u8003\uff0c\u505a\u7b14\u8bb0\uff01<\/p>\n<p>\u6539\u53d8\u6e32\u67d3\u72b6\u6001\u4f1a\u6253\u65ad\u6e32\u67d3\u5408\u6279\uff0c\u4f8b\u5982\u6539\u53d8\u7eb9\u7406\u72b6\u6001\uff08\u9884\u4e58\u3001\u5faa\u73af\u6a21\u5f0f\u548c\u8fc7\u6ee4\u6a21\u5f0f\uff09\u6216\u6539\u53d8 Material\uff08\u6750\u8d28\uff09\u3001Blend\uff08\u6df7\u5408\u6a21\u5f0f\uff09\u7b49\u7b49\uff0c\u6240\u4ee5\u4f7f\u7528\u81ea\u5b9a\u4e49 Shader \u4e5f\u4f1a\u6253\u65ad\u5408\u6279\u3002<\/p><\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e3e\u4e2a\u6817\u5b50\uff0c\u6211\u8fd9\u91cc\u6709\u4e00\u4e2a\u7531 10 \u5f20\u788e\u56fe\u548c 1 \u4e2a\u6587\u672c\u6240\u7ec4\u6210\u7684\u5f39\u7a97\uff08\u5047\u8bbe\u90fd\u4f7f\u7528\u540c\u6837\u7684\u6e32\u67d3\u65b9\u5f0f\uff09\uff1a<\/p>\n<ol class=\"list-paddingleft-2\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section>\u5728\u4e0d\u505a\u4efb\u4f55\u4f18\u5316\u4e14\u672a\u5f00\u542f\u52a8\u6001\u5408\u56fe\u7684\u60c5\u51b5\u4e0b\uff0c\u6e32\u67d3\u8fd9\u4e2a\u5f39\u7a97\u9700\u8981 11 \u4e2a DrawCall\u3002<\/section>\n<\/li>\n<li>\n<section>\u5c06\u6240\u6709\u788e\u56fe\u6253\u6210\u4e00\u4e2a\u56fe\u96c6\uff0c\u6587\u672c\u8282\u70b9\u5939\u5728\u7cbe\u7075\u8282\u70b9\u4e4b\u95f4\u7684\u60c5\u51b5\u4e0b\u9700\u8981 3 \u4e2a DrawCall\uff0c\u5728\u9876\u90e8\u6700\u5916\u5c42\u6216\u8005\u5e95\u90e8\u6700\u5916\u5c42\u7684\u60c5\u51b5\u4e0b\u9700\u8981 2 \u4e2a DrawCall\u3002<\/section>\n<\/li>\n<li>\n<section>\u6587\u672c\u4f7f\u7528 BMFont\uff0c\u5c06\u6240\u6709\u788e\u56fe\u548c BMFont \u6253\u6210\u4e00\u4e2a\u56fe\u96c6\u7684\u8bdd\u53ea\u9700\u8981 1 \u4e2a DrawCall\uff0c\u5982\u679c\u788e\u56fe\u4e0d\u548c BMFont \u6253\u6210\u4e00\u4e2a\u56fe\u96c6\u7684\u60c5\u51b5\u5219\u53c2\u8003\u7b2c 2 \u9879\u3002<\/section>\n<\/li>\n<li>\n<section>\u788e\u56fe\u4e0d\u6253\u5305\u56fe\u96c6\uff0c\u5f00\u542f\u52a8\u6001\u5408\u56fe\uff0c\u5728\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u6587\u672c\u4f7f\u7528 BMFont \u6700\u5c11\u53ea\u9700\u8981 1 \u4e2a DrawCall\uff0c\u4e0d\u4f7f\u7528 BMFont \u7684\u60c5\u51b5\u540c\u6837\u53c2\u8003\u7b2c 2 \u9879\u3002<\/section>\n<\/li>\n<\/ol>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u5982\u679c\u4e0a\u9762\u7684\u4f8b\u5b50\u4f60\u4e0d\u592a\u80fd\u7406\u89e3\u7684\u8bdd\uff0c\u90a3\u8bf7\u63a5\u7740\u770b\u4e0b\u9762\u7684\u5185\u5bb9\uff0c\u76f8\u4fe1\u4f60\u9605\u8bfb\u5b8c\u672c\u7bc7\u6587\u7ae0\u7684\u5168\u90e8\u5185\u5bb9\u540e\u518d\u6765\u770b\u8fd9\u4e2a\u4f8b\u5b50\u5c06\u4f1a\u8305\u585e\u987f\u5f00\u54c8\u54c8\u54c8~<\/p>\n<p>\u52a8\u6001\u5408\u56fe\u548c BMFont \u4f1a\u5728\u540e\u9762\u8bf4\u5230\u3002<\/p><\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5f53\u7136\u4e0a\u9762\u8fd9\u4e2a\u4f8b\u5b50\u7b97\u662f\u6bd4\u8f83\u7406\u60f3\u7684\u60c5\u51b5\uff0c\u5b9e\u9645\u4e0a\u7684\u60c5\u51b5\u53ef\u80fd\u4f1a\u6bd4\u4f8b\u5b50\u66f4\u4e3a\u590d\u6742\uff0c\u7cbe\u7075\u548c\u6587\u672c\u53ef\u80fd\u4f1a\u66f4\u591a\uff0c\u4e5f\u4e0d\u4e00\u5b9a\u80fd\u5c06\u6240\u6709\u56fe\u50cf\u8d44\u6e90\u90fd\u6253\u5305\u8fdb\u4e00\u4e2a\u56fe\u96c6\u3002\u6240\u4ee5\u6211\u4eec\u53ea\u80fd\u662f\u5c3d\u91cf\u5408\u7406\u5730\u53bb\u4f18\u5316\uff0c\u907f\u514d\u51fa\u73b0\u201c\u6361\u4e86\u829d\u9ebb\uff0c\u4e22\u4e86\u897f\u74dc\u201d\u7684\u60c5\u51b5\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u4e0d\u5efa\u8bae\u4efb\u4f55\u56fe\u50cf\u8d44\u6e90\u7684\u5c3a\u5bf8\u8d85\u8fc7 2048 * 2048\uff0c\u5426\u5219\u5728\u5c0f\u6e38\u620f\u548c\u539f\u751f\u5e73\u53f0\u53ef\u80fd\u4f1a\u51fa\u73b0\u95ee\u9898\uff1b<\/p>\n<p>\u800c\u4e14\u56fe\u50cf\u5c3a\u5bf8\u8d8a\u5927\uff0c\u52a0\u8f7d\u7684\u65f6\u95f4\u4e5f\u8d8a\u957f\uff0c\u800c\u4e14\u662f\u975e\u7ebf\u6027\u7684\u90a3\u79cd\u589e\u957f\uff0c\u4f8b\u5982\u52a0\u8f7d\u4e00\u5f20\u56fe\u50cf\u6bd4\u52a0\u8f7d\u4e24\u5f20\u56fe\u50cf\u6240\u6d88\u8017\u7684\u65f6\u95f4\u8fd8\u957f\uff0c\u5f97\u4e0d\u507f\u5931\u3002<\/p><\/blockquote>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e0b\u9762\u4ecb\u7ecd\u4e24\u79cd\u6253\u5305\u9759\u6001\u56fe\u96c6\u7684\u65b9\u5f0f\uff1a<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90\uff08Auto Atlas\uff09<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5229\u7528 Cocos Creator \u5185\u7f6e\u7684\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90\u6765\u5c06\u788e\u56fe\u6253\u5305\u6210\u56fe\u96c6\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728\u9879\u76ee\u6784\u5efa\u65f6\uff0c\u7f16\u8f91\u5668\u4f1a\u5c06\u6240\u6709\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90\u6240\u5728\u6587\u4ef6\u5939\u4e0b\u7684\u6240\u6709\u7b26\u5408\u8981\u6c42\u7684\u56fe\u50cf\u5206\u522b\u6839\u636e\u914d\u7f6e\u6253\u5305\u6210\u4e00\u4e2a\u6216\u591a\u4e2a\u56fe\u96c6\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90\u4f7f\u7528\u8d77\u6765\u5f88\u7075\u6d3b\uff0c\u7f16\u8f91\u5668\u5728\u6253\u5305\u56fe\u96c6\u65f6\u4f1a\u81ea\u52a8\u9012\u5f52\u5b50\u76ee\u5f55\uff0c\u82e5\u5b50\u76ee\u5f55\u4e0b\u4e5f\u6709\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90\uff08\u5373 <code>.pac<\/code> \u6587\u4ef6\uff09\u5219\u4f1a\u8df3\u8fc7\u8be5\u76ee\u5f55\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u5bf9\u540c\u4e00\u76ee\u5f55\u4e0b\u7684\u4e0d\u540c\u90e8\u5206\u7684\u788e\u56fe\u914d\u7f6e\u4e0d\u540c\u7684\u53c2\u6570\u3002<\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u521b\u5efa\u81ea\u52a8\u56fe\u96c6\u914d\u7f6e<\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728<strong>\u300c\u8d44\u6e90\u7ba1\u7406\u5668\u300d<\/strong>\u4e2d\u53f3\u952e\uff0c\u70b9\u51fb [ \u65b0\u5efa -&gt; \u81ea\u52a8\u56fe\u96c6\u914d\u7f6e ] \u5c31\u4f1a\u65b0\u5efa\u4e00\u4e2a\u540d\u4e3a <code>AutoAtlas.pac<\/code> \u7684\u8d44\u6e90\u3002<\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u914d\u7f6e\u5c5e\u6027<\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728<strong>\u300c\u8d44\u6e90\u7ba1\u7406\u5668\u300d<\/strong>\u4e2d\u70b9\u51fb\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90\u6587\u4ef6\u5c31\u53ef\u4ee5\u5728<strong>\u300c\u5c5e\u6027\u68c0\u67e5\u5668\u300d<\/strong>\u9762\u677f\u4e2d\u770b\u5230\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90\u53ef\u914d\u7f6e\u7684\u5c5e\u6027\uff0c\u70b9\u51fb Preview \u6309\u94ae\u5373\u53ef\u9884\u89c8\u56fe\u96c6\u3002<\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5173\u4e8e\u81ea\u52a8\u56fe\u96c6\u7684\u51e0\u70b9\u5efa\u8bae<\/h5>\n<ol class=\"list-paddingleft-2\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section>\u5408\u7406\u63a7\u5236\u56fe\u96c6\u6700\u5927\u5c3a\u5bf8\uff0c\u907f\u514d\u5355\u4e2a\u56fe\u50cf\u52a0\u8f7d\u65f6\u95f4\u8fc7\u957f\u3002<\/section>\n<\/li>\n<li>\n<section>\u5c3a\u5bf8\u592a\u5927\u7684\u56fe\u50cf\u6ca1\u6709\u5fc5\u8981\u6253\u8fdb\u56fe\u96c6\uff08\u5982\u80cc\u666f\u56fe\uff09\u3002<\/section>\n<\/li>\n<li>\n<section>\u5584\u7528\u4e5d\u5bab\u683c\uff08Sliced\uff09\u53ef\u4ee5\u8282\u7701\u5f88\u591a\u7a7a\u95f4\uff08\u8fd9\u4e00\u70b9\u9700\u8981\u7f8e\u672f\u5927\u4f6c\u914d\u5408\uff09\u3002<\/section>\n<\/li>\n<li>\n<section>\u95f4\u8ddd\u4fdd\u6301\u9ed8\u8ba4\u7684 2 \u5e76\u4fdd\u6301\u52fe\u9009\u6269\u8fb9\u9009\u9879\uff0c\u907f\u514d\u56fe\u50cf\u88c1\u526a\u9519\u8bef\u548c\u51fa\u73b0\u9ed1\u8fb9\u7684\u60c5\u51b5\u3002<\/section>\n<\/li>\n<li>\n<section>\u52fe\u9009\u4e0d\u5305\u542b\u672a\u88ab\u5f15\u7528\u8d44\u6e90\u9009\u9879\uff0c\u81ea\u52a8\u6392\u9664\u6ca1\u6709\u7528\u5230\u7684\u56fe\u50cf\u4ee5\u8282\u7701\u7a7a\u95f4\uff08\u8be5\u9009\u9879\u9884\u89c8\u65f6\u65e0\u6548\uff09\u3002<\/section>\n<\/li>\n<li>\n<section>\u5f00\u53d1\u65f6\u9884\u89c8\u56fe\u96c6\uff0c\u6839\u636e\u7ed3\u679c\u8fdb\u884c\u8c03\u6574\uff0c\u4ee5\u8fbe\u5230\u6700\u597d\u7684\u4f18\u5316\u6548\u679c\u3002<\/section>\n<\/li>\n<\/ol>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u5173\u4e8e\u6bcf\u4e2a\u5c5e\u6027\u5177\u4f53\u7684\u4f5c\u7528\u8bf7\u53c2\u8003\u5b98\u65b9\u6587\u6863\u3002<\/p>\n<p>\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90\u5b98\u65b9\u6587\u6863\uff1ahttp:\/\/docs.cocos.com\/creator\/manual\/zh\/asset-workflow\/auto-atlas.html#\u914d\u7f6e\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90<\/p><\/blockquote>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">TexturePacker<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6211\u4eec\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u8f6f\u4ef6 TexturePacker \u6765\u9884\u5148\u5c06\u56fe\u50cf\u6253\u5305\u6210\u56fe\u96c6\u518d\u5bfc\u5165\u9879\u76ee\u4e2d\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">TexturePacker \u662f\u6536\u8d39\u8f6f\u4ef6\uff0c\u4f46\u662f\u4e00\u822c\u60c5\u51b5\u4e0b\u514d\u8d39\u529f\u80fd\u5c31\u5df2\u7ecf\u591f\u7528\u4e86\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u53e6\u5916\u4f7f\u7528 TexturePacker \u6253\u5305\u56fe\u96c6\u65f6\u9700\u8981\u6ce8\u610f\u914d\u7f6e<strong>\u300c\u5f62\u72b6\u586b\u5145\uff08Shape Padding\uff0c\u5bf9\u5e94 Auto Atlas \u4e2d\u7684\u95f4\u8ddd\uff09\u300d<\/strong>\uff0c\u907f\u514d\u67d0\u5f20\u56fe\u50cf\u51fa\u73b0\u76f8\u90bb\u56fe\u50cf\u7684\u50cf\u7d20\u7684\u60c5\u51b5\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>TexturePacker \u5b98\u7f51\u5730\u5740\uff1ahttps:\/\/www.codeandweb.com\/texturepacker<\/p><\/blockquote>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">Auto Atlas \u548c TexturePacker \u7684\u5bf9\u6bd4<\/h4>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\">Auto Atlas<\/h5>\n<ul class=\"list-paddingleft-2\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section>Cocos Creator \u5185\u7f6e\uff0c\u65b9\u4fbf\u5230\u5bb6\u4e86<\/section>\n<\/li>\n<li>\n<section>\u529f\u80fd\u4e0d\u591a\u4f46\u662f\u8be5\u6709\u7684\u90fd\u6709\uff0c\u514d\u8d39<\/section>\n<\/li>\n<li>\n<section>\u9879\u76ee\u6784\u5efa\u65f6\u624d\u751f\u6210\u56fe\u96c6\uff0c\u5f00\u53d1\u65f6\u4efb\u610f\u4fee\u6539\u65e0\u538b\u529b<\/section>\n<\/li>\n<li>\n<section>\u56fe\u96c6\u5c3a\u5bf8\u5728\u751f\u6210\u65f6\u81ea\u9002\u5e94\uff0c\u8282\u7701\u7a7a\u95f4<\/section>\n<\/li>\n<li>\n<section>\u652f\u6301\u81ea\u52a8\u7eb9\u7406\u538b\u7f29<\/section>\n<\/li>\n<\/ul>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\">TexturePacker<\/h5>\n<ul class=\"list-paddingleft-2\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section>\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u9700\u81ea\u884c\u5b89\u88c5\uff0c\u4e0d\u591f\u65b9\u4fbf<\/section>\n<\/li>\n<li>\n<section>\u6536\u8d39\u529f\u80fd\u5f88\u591a\u5f88\u4e13\u4e1a\u4f46\u662f\u7528\u4e0d\u7740\uff0c\u514d\u8d39\u529f\u80fd\u4e5f\u591f\u7528<\/section>\n<\/li>\n<li>\n<section>\u5148\u751f\u6210\u56fe\u96c6\u518d\u4f7f\u7528\uff0c\u66f4\u6362\u56fe\u50cf\u53c8\u8981\u91cd\u65b0\u751f\u6210\u56fe\u96c6<\/section>\n<\/li>\n<li>\n<section>\u5c3a\u5bf8\u56fa\u5b9a\u9700\u8981\u81ea\u5df1\u8bbe\u7f6e<\/section>\n<\/li>\n<li>\n<section>\u81ea\u5df1\u538b\u7f29\u53bb<\/section>\n<\/li>\n<\/ul>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u603b\u7ed3\uff1aAuto Atlas \u771f\u9999\uff01<\/p><\/blockquote>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u52a8\u6001\u5408\u56fe\uff08Dynamic Atlas\uff09<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u8fd9\u91cc\u5f15\u7528\u5b98\u65b9\u6587\u6863\u4e2d\u5bf9\u4e8e\u52a8\u6001\u5408\u56fe\u7684\u4ecb\u7ecd\uff1a<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>Cocos Creator \u63d0\u4f9b\u4e86\u5728\u9879\u76ee\u6784\u5efa\u65f6\u7684\u9759\u6001\u5408\u56fe\u65b9\u6cd5 \u2014\u2014 <strong>\u300c\u81ea\u52a8\u5408\u56fe\u300d<\/strong>\uff08Auto Atlas\uff09\u3002\u4f46\u662f\u5f53\u9879\u76ee\u65e5\u76ca\u58ee\u5927\u7684\u65f6\u5019\u8d34\u56fe\u4f1a\u53d8\u5f97\u975e\u5e38\u591a\uff0c\u5f88\u96be\u5c06\u8d34\u56fe\u6253\u5305\u5230\u4e00\u5f20\u5927\u8d34\u56fe\u4e2d\uff0c\u8fd9\u65f6\u9759\u6001\u5408\u56fe\u5c31\u6bd4\u8f83\u96be\u4ee5\u6ee1\u8db3\u964d\u4f4e DrawCall \u7684\u9700\u6c42\u3002\u6240\u4ee5 Cocos Creator \u5728 v2.0 \u4e2d\u52a0\u5165\u4e86 <strong>\u300c\u52a8\u6001\u5408\u56fe\u300d<\/strong>\uff08Dynamic Atlas\uff09\u7684\u529f\u80fd\uff0c\u5b83\u80fd\u5728\u9879\u76ee\u8fd0\u884c\u65f6\u52a8\u6001\u7684\u5c06\u8d34\u56fe\u5408\u5e76\u5230\u4e00\u5f20\u5927\u8d34\u56fe\u4e2d\u3002\u5f53\u6e32\u67d3\u4e00\u5f20\u8d34\u56fe\u7684\u65f6\u5019\uff0c\u52a8\u6001\u5408\u56fe\u7cfb\u7edf\u4f1a\u81ea\u52a8\u68c0\u6d4b\u8fd9\u5f20\u8d34\u56fe\u662f\u5426\u5df2\u7ecf\u88ab\u5408\u5e76\u5230\u4e86\u56fe\u96c6\uff08\u56fe\u7247\u96c6\u5408\uff09\u4e2d\uff0c\u5982\u679c\u6ca1\u6709\uff0c\u5e76\u4e14\u6b64\u8d34\u56fe\u53c8\u7b26\u5408\u52a8\u6001\u5408\u56fe\u7684\u6761\u4ef6\uff0c\u5c31\u4f1a\u5c06\u6b64\u8d34\u56fe\u5408\u5e76\u5230\u56fe\u96c6\u4e2d\u3002<\/p>\n<p>\u52a8\u6001\u5408\u56fe\u5b98\u65b9\u6587\u6863\uff1ahttps:\/\/docs.cocos.com\/creator\/manual\/zh\/advanced-topics\/dynamic-atlas.html<\/p><\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u7b80\u5355\u6765\u8bf4\uff0c\u5f00\u542f\u52a8\u6001\u5408\u56fe\u4e4b\u540e\uff0c\u5f15\u64ce\u4f1a\u5728\u8fd0\u884c\u65f6\u5e2e\u6211\u4eec\u5bf9\u7b26\u5408\u6761\u4ef6\uff08\u5373\u5c3a\u5bf8\u5c0f\u4e8e\u788e\u56fe\u9650\u5236\u7684\u6700\u5927\u5c3a\u5bf8\uff09\u7684\u7cbe\u7075\u8fdb\u884c\u5408\u56fe\uff0c\u8fbe\u5230\u548c\u63d0\u524d\u6253\u5305\u56fe\u96c6\u4e00\u6837\u7684\u6548\u679c\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5f15\u64ce\u7684<strong>\u300c\u52a8\u6001\u56fe\u96c6\u5c3a\u5bf8\u6700\u5927\u662f 2048 * 2048\u300d<\/strong>\uff0c\u53ef\u5408\u5e76\u7684<strong>\u300c\u788e\u56fe\u9650\u5236\u7684\u6700\u5927\u5c3a\u5bf8\u662f 512\u300d<\/strong>\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u4e0b\u9762\u7684 API \u8fdb\u884c\u4fee\u6539\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\"><code>cc.dynamicAtlasManager.maxFrameSize\u00a0=\u00a0512;\r\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong>\u300c\u542f\u7528\u52a8\u6001\u5408\u56fe\u4f1a\u5360\u7528\u989d\u5916\u7684\u5185\u5b58\u300d<\/strong>\uff0c\u4e0d\u540c\u5e73\u53f0\u5360\u7528\u7684\u5185\u5b58\u5927\u5c0f\u4e0d\u4e00\u6837\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5c0f\u6e38\u620f\u548c\u539f\u751f\u5e73\u53f0\u4e0a\u9ed8\u8ba4\u4f1a\u7981\u7528\u52a8\u6001\u5408\u56fe\uff0c\u4f46\u5982\u679c\u4f60\u7684\u9879\u76ee\u5185\u5b58\u7a7a\u95f4\u4ecd\u6709\u5bcc\u4f59\u7684\u8bdd\u5efa\u8bae\u5f3a\u5236\u5f00\u542f\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\"><code>cc.macro.CLEANUP_IMAGE_CACHE\u00a0=\u00a0false;\r\ncc.dynamicAtlasManager.enabled\u00a0=\u00a0true;\r\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u53e6\u5916\u8fd8\u9700\u8981\u4fdd\u8bc1\u7eb9\u7406\u7684 Premulyiply Alpha\uff08\u9884\u4e58\uff09\u3001Wrap Mode\uff08\u5faa\u73af\u6a21\u5f0f\uff09 \u548c Filter Mode\uff08\u8fc7\u6ee4\u6a21\u5f0f\uff09 \u7b49\u4fe1\u606f\u4e0e\u52a8\u6001\u56fe\u96c6\u4e00\u81f4\u624d\u80fd\u591f\u52a8\u6001\u5408\u6279\u3002\u9759\u6001\u56fe\u96c6\u4e5f\u53ef\u4ee5\u53c2\u4e0e\u52a8\u6001\u5408\u56fe<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728\u52a8\u6001\u5408\u56fe\u7684\u5b98\u65b9\u6587\u6863\u4e2d\u6709\u63d0\u5230\uff1a<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u5f53\u6e32\u67d3\u4e00\u5f20\u8d34\u56fe\u7684\u65f6\u5019\uff0c\u52a8\u6001\u5408\u56fe\u7cfb\u7edf\u4f1a\u81ea\u52a8\u68c0\u6d4b\u8fd9\u5f20\u8d34\u56fe\u662f\u5426\u5df2\u7ecf\u88ab\u5408\u5e76\u5230\u4e86\u56fe\u96c6\uff08\u56fe\u7247\u96c6\u5408\uff09\u4e2d\uff0c\u5982\u679c\u6ca1\u6709\uff0c\u5e76\u4e14\u6b64\u8d34\u56fe\u53c8\u7b26\u5408\u52a8\u6001\u5408\u56fe\u7684\u6761\u4ef6\uff0c\u5c31\u4f1a\u5c06\u6b64\u8d34\u56fe\u5408\u5e76\u5230\u56fe\u96c6\u4e2d\u3002<\/p><\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4f46\u5176\u5b9e<strong>\u300c\u53ea\u8981\u9759\u6001\u56fe\u96c6\u6ee1\u8db3\u52a8\u6001\u5408\u56fe\u7684\u8981\u6c42\uff08\u5373\u5c3a\u5bf8\u5c0f\u4e8e\u788e\u56fe\u9650\u5236\u7684\u6700\u5927\u5c3a\u5bf8\uff09\uff0c\u4e5f\u662f\u53ef\u4ee5\u53c2\u4e0e\u52a8\u6001\u5408\u56fe\u7684\u300d<\/strong>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6ce8\u610f\uff1a\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90\uff08Auto Atlas\uff09\u9700\u8981\u5728\u5176\u5c5e\u6027\u68c0\u67e5\u5668\u9762\u677f\u4e2d\u5f00\u542f <strong>\u300cTexture\u300d<\/strong> \u680f\u4e0b\u7684 <strong>\u300cPackable\u300d<\/strong> \u9009\u9879\uff0c\u8be5\u9009\u9879\u9ed8\u8ba4\u662f\u7981\u7528\u7684\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u989d\u5916\u8865\u5145<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong>\u300c\u53ea\u6709\u7eb9\u7406\u5f00\u542f\u4e86 Packable \u9009\u9879\u7684\u7cbe\u7075\u624d\u80fd\u591f\u53c2\u4e0e\u52a8\u6001\u5408\u56fe\u300d<\/strong>\uff0c\u8be5\u9009\u9879\u9ed8\u8ba4\u5f00\u542f\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u7eb9\u7406\u53c2\u4e0e\u52a8\u6001\u5408\u56fe\u540e\u4f1a\u4fee\u6539\u539f\u59cb\u8d34\u56fe\u7684 UV \u5750\u6807\uff0c\u6240\u4ee5\u5728 Shader \u4e2d\u7684\u65e0\u6cd5\u6b63\u786e\u8ba1\u7b97 UV \u5750\u6807\uff0c\u5bfc\u81f4 Shader \u65e0\u6548\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong>\u300c\u5982\u679c\u9700\u8981\u5bf9\u7cbe\u7075\u4f7f\u7528\u81ea\u5b9a\u4e49 Shader\uff0c\u9700\u8981\u7981\u7528\u5176\u7eb9\u7406\u7684 Packable \u9009\u9879\u3002\u300d<\/strong><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e5f\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u7981\u7528\u8be5\u9009\u9879\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\"><code>let\u00a0sprite\u00a0=\u00a0this.node.getComponent(cc.Sprite);\r\nlet\u00a0texture\u00a0=\u00a0sprite.spriteFrame.getTexture();\r\ntexture.packable\u00a0=\u00a0false;\r\n<\/code><\/pre>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>Packable \u5b98\u65b9\u6587\u6863\uff1ahttps:\/\/docs.cocos.com\/creator\/manual\/zh\/asset-workflow\/sprite.html?h=packable<\/p><\/blockquote>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4f4d\u56fe\u5b57\u4f53\uff08BMFont\uff09<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728\u573a\u666f\u4e2d\u4f7f\u7528\u7cfb\u7edf\u5b57\u4f53\u6216 TTF \u5b57\u4f53\u7684 Label \u4f1a\u6253\u65ad\u6e32\u67d3\u5408\u6279\uff0c\u7279\u522b\u662f Label \u548c Sprite \u5c42\u53e0\u4ea4\u9519\u7684\u60c5\u51b5\uff0c\u6bcf\u4e00\u4e2a Label \u90fd\u4f1a\u6253\u65ad\u5408\u6279\u589e\u52a0\u4e00\u4e2a DrawCall\uff0c\u6587\u672c\u591a\u7684\u573a\u666f\u4e0b\u8f7b\u8f7b\u677e\u677e 100+\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5bf9\u4e8e\u6e38\u620f\u4e2d\u7684\u6587\u672c\uff0c\u7279\u522b\u662f\u6570\u5b57\u3001\u5b57\u6bcd\u548c\u7b26\u53f7\uff0c\u90fd\u5efa\u8bae<strong>\u300c\u4f7f\u7528 BMFont \u6765\u4ee3\u66ff TTF \u6216\u7cfb\u7edf\u5b57\u4f53\u300d<\/strong>\uff0c\u5e76\u4e14<strong>\u300c\u5c06 BMFont \u4e0e UI \u788e\u56fe\u6253\u5305\u5230\u540c\u4e00\u56fe\u96c6\u4e2d\u300d<\/strong>\uff08\u6216<strong>\u300c\u5f00\u542f\u52a8\u6001\u5408\u56fe\u300d<\/strong>\uff09\uff0c\u53ef\u4ee5\u514d\u9664\u5927\u90e8\u5206\u6587\u672c\u5bfc\u81f4\u7684 DrawCall\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e3e\u4e2a\u6817\u5b50<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4f8b\u5982\u4e00\u4e2a\u573a\u666f\u4e2d\u6709 80 \u5f20\u7cbe\u7075\u548c 80 \u4e2a\u6587\u672c\uff08\u7cfb\u7edf\u5b57\u4f53\uff09\u76f8\u4e92\u4ea4\u9519\uff0c\u8282\u70b9\u5c42\u7ea7\u5982\u4e0b\u56fe\uff1a<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u8fd0\u884c\u8d77\u6765\u4e4b\u540e\u53ef\u4ee5\u770b\u5230\u5de6\u4e0b\u89d2\u7684 Profile \u663e\u793a DrawCall \u5df2\u7ecf\u9ad8\u8fbe 161 \u4e2a\uff0c\u4e5f\u5c31\u662f\u8bf4\u6bcf\u4e00\u4e2a\u7cbe\u7075\u548c\u6587\u672c\u90fd\u589e\u52a0\u4e00\u4e2a DrawCall\uff0c\u8fd9\u79cd\u60c5\u51b5\u5373\u4f7f\u7cbe\u7075\u6253\u4e86\u56fe\u96c6\u4e5f\u4e00\u6837\u65e0\u6d4e\u4e8e\u4e8b\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u4e0d\u8981\u95ee\u660e\u660e\u53ea\u6709 80 \u5f20\u7cbe\u7075\u548c 80 \u4e2a\u6587\u672c\u4e0d\u5e94\u8be5\u662f 160 \u4e2a DrawCall \u5417\u4e3a\u4ec0\u4e48\u662f 161 \u4e2a&#8230;<\/p>\n<p>\u56e0\u4e3a\u5de6\u4e0b\u89d2\u7684 Profile \u4e5f\u8981\u5360\u4e00\u4e2a : (<\/p><\/blockquote>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\"><\/figure>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5bf9\u6bd4\u6817\u5b50<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u8fd8\u662f\u4e0a\u9762\u7684\u573a\u666f\uff0c\u5c1d\u8bd5\u5c06 Label \u7684\u7cfb\u7edf\u5b57\u4f53\u6362\u6210 BMFont \u5e76\u4e14\u4e0e\u7cbe\u7075\u6253\u5305\u5230\u540c\u4e00\u4e2a\u56fe\u96c6\u4e4b\u540e\uff0c\u540c\u6837\u662f 80 \u4e2a\u7cbe\u7075\u548c 80 \u4e2a\u6587\u672c\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4f46\u662f DrawCall \u53ea\u6709 2 \u4e2a\uff0c\u540c\u65f6\u5e27\u65f6\u95f4\u964d\u4f4e\u5230\u4e86 1ms\uff0c\u5e27\u7387\u63d0\u5347\u4e86 10 FPS\uff0c\u6e32\u67d3\u8017\u65f6\u964d\u4f4e\u5230\u4e86 0.6ms\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u5b9e\u9645\u4e0a\u573a\u666f\u53ea\u5360\u4e86 1 \u4e2a DrawCall\uff0c\u53e6\u4e00\u4e2a DrawCall \u662f\u5de6\u4e0b\u89d2\u7684 Profile \u5360\u7684&#8230;<\/p><\/blockquote>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\"><\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u53e6\u5916\uff0c\u5bf9\u4e8e\u6c49\u5b57\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528 Label \u7ec4\u4ef6\u7684 <strong>\u300cCache Mode\u300d<\/strong> \u6765\u4f18\u5316\u3002<\/p>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6587\u672c\u7f13\u5b58\u6a21\u5f0f\uff08Cache Mode\uff09<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">Cocos Creator 2.0.9 \u7248\u672c\u5728 Label \u7ec4\u4ef6\u4e0a\u589e\u52a0\u4e86 <strong>\u300cCache Mode\u300d<\/strong> \u9009\u9879\uff0c\u6765\u89e3\u51b3\u7cfb\u7edf\u5b57\u4f53\u548c TTF \u5b57\u4f53\u5e26\u6765\u7684\u6027\u80fd\u95ee\u9898\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>Cache Mode \u5b98\u65b9\u6587\u6863\uff1ahttps:\/\/docs.cocos.com\/creator\/manual\/zh\/components\/label.html#\u6587\u672c\u7f13\u5b58\u7c7b\u578b\uff08cache-mode\uff09<\/p><\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">Cache Mode \u6709\u4ee5\u4e0b3 \u79cd\u9009\u62e9\uff1a<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">NONE\uff08\u9ed8\u8ba4\uff09<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6bcf\u4e00\u4e2a Label \u90fd\u4f1a\u751f\u6210\u4e3a\u4e00\u5f20\u5355\u72ec\u7684\u4f4d\u56fe\uff0c\u4e14\u4e0d\u4f1a\u53c2\u4e0e\u52a8\u6001\u5408\u56fe\uff0c\u6240\u4ee5\u6bcf\u4e00\u4e2a Label \u90fd\u4f1a\u6253\u65ad\u6e32\u67d3\u5408\u6279\u3002<\/p>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">BITMAP<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5f53 Label \u7ec4\u4ef6\u5f00\u542f BITMAP \u6a21\u5f0f\u540e\uff0c\u6587\u672c\u540c\u6837\u4f1a\u751f\u6210\u4e3a\u4e00\u5f20\u4f4d\u56fe\uff0c\u4f46\u662f<strong>\u300c\u53ea\u8981\u7b26\u5408\u52a8\u6001\u5408\u56fe\u8981\u6c42\u5c31\u53ef\u4ee5\u53c2\u4e0e\u52a8\u6001\u5408\u56fe\uff0c\u548c\u5468\u56f4\u7684\u7cbe\u7075\u5408\u5e76 DrawCall\u300d<\/strong>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong>\u300c\u4e00\u5b9a\u8981\u6ce8\u610f BITMAP \u6a21\u5f0f\u53ea\u9002\u7528\u4e8e\u4e0d\u9891\u7e41\u66f4\u6539\u7684\u6587\u672c\uff0c\u5426\u5219\u5185\u5b58\u7206\u70b8\u4e86\u540e\u679c\u81ea\u8d1f\uff01\u300d<\/strong><\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e3e\u4e2a\u6817\u5b50<\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u540c\u6837\u662f\u4e0a\u6587\u63d0\u5230\u7684<strong>\u300c\u7cbe\u7075\u548c\u6587\u672c\u76f8\u4e92\u4ea4\u9519\u300d<\/strong>\u7684\u4f8b\u5b50\uff0c<strong>\u300c\u6587\u672c\u4f7f\u7528 BITMAP \u6a21\u5f0f\uff0c\u7cbe\u7075\u4e0d\u6253\u5305\u6210\u56fe\u96c6\uff0c\u5f00\u542f\u52a8\u6001\u5408\u56fe\u300d<\/strong>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u7ed3\u679c\u662f\u6240\u6709\u7cbe\u7075\uff08\u5305\u62ec\u80cc\u666f\uff09\u548c\u6587\u672c\u90fd\u6210\u529f\u52a8\u6001\u5408\u56fe\uff0c\u5b9e\u9645 DrawCall \u964d\u81f3 1 \u4e2a\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u5982\u679c\u7cbe\u7075\u6253\u5305\u6210\u4e86\u56fe\u96c6\u5219\u4f1a\u53d8\u6210 160 \u4e2a\uff0c\u56e0\u4e3a\u56fe\u96c6\u9ed8\u8ba4\u4e0d\u53c2\u4e0e\u52a8\u6001\u5408\u56fe\u3002<\/p>\n<p>\u6240\u4ee5\u5f53\u524d\u8fd9\u79cd\u60c5\u51b5\uff08\u5c11\u7cbe\u7075\u591a\u6587\u672c\uff09\u4e0d\u6253\u56fe\u96c6\u53cd\u800c\u662f\u6bd4\u8f83\u597d\u7684\u9009\u62e9\u3002<\/p><\/blockquote>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\"><\/figure>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">CHAR<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5f53 Label \u7ec4\u4ef6\u5f00\u542f CHAR \u6a21\u5f0f\u540e\uff0c\u5f15\u64ce\u4f1a\u5c06\u8be5 Label \u4e2d\u51fa\u73b0\u7684\u6240\u6709\u5b57\u7b26\u7f13\u5b58\u5230\u4e00\u5f20\u5168\u5c40\u5171\u4eab\u7684\u4f4d\u56fe\u4e2d\uff0c\u76f8\u5f53\u4e8e\u662f\u751f\u6210\u4e86\u4e00\u4e2a BMFont\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong>\u300c\u9002\u7528\u4e8e\u6587\u672c\u9891\u7e41\u66f4\u6539\u7684\u60c5\u51b5\uff0c\u5bf9\u6027\u80fd\u548c\u5185\u5b58\u6700\u53cb\u597d\u3002\u300d<\/strong><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6ce8\u610f\uff1a<strong>\u300c\u8be5\u6a21\u5f0f\u53ea\u80fd\u7528\u4e8e\u5b57\u4f53\u6837\u5f0f\u548c\u5b57\u53f7\u56fa\u5b9a\uff0c\u5e76\u4e14\u4e0d\u4f1a\u9891\u7e41\u51fa\u73b0\u5de8\u91cf\u672a\u4f7f\u7528\u8fc7\u7684\u5b57\u7b26\u7684 Label\u3002\u56e0\u4e3a\u5171\u4eab\u4f4d\u56fe\u7684\u6700\u5927\u5c3a\u5bf8\u4e3a 2048*2048\uff0c\u5360\u6ee1\u4e86\u4e4b\u540e\u5c31\u6ca1\u529e\u6cd5\u518d\u6e32\u67d3\u65b0\u7684\u5b57\u7b26\uff0c\u9700\u8981\u5207\u6362\u573a\u666f\u624d\u4f1a\u6e05\u9664\u5171\u4eab\u4f4d\u56fe\u3002\u300d<\/strong><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5f00\u542f\u4e86 CHAR \u6a21\u5f0f\u7684 Label \u65e0\u6cd5\u53c2\u4e0e\u52a8\u6001\u5408\u56fe\uff0c\u4f46\u662f\u53ef\u4ee5\u548c\u76f8\u90bb\u7684\u540c\u6837\u662f CHAR \u6a21\u5f0f\u7684 Label \u5408\u5e76 DrawCall\uff08\u76f8\u5f53\u4e8e\u662f\u4e00\u5f20\u672a\u6253\u5305\u8fdb\u56fe\u96c6\u7684 BMFont\uff09\u3002<\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e3e\u4e2a\u6817\u5b50<\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u8fd8\u662f\u662f\u4e0a\u6587\u63d0\u5230\u7684<strong>\u300c\u7cbe\u7075\u548c\u6587\u672c\u76f8\u4e92\u4ea4\u9519\u300d<\/strong>\u7684\u4f8b\u5b50\uff0c\u4e3a\u4e86\u66f4\u597d\u4f53\u73b0 CHAR \u6a21\u5f0f\u7684\u4f18\u52bf\uff0c\u6211\u66f4\u6539\u4e86\u573a\u666f\u8282\u70b9\u7684\u7ed3\u6784\uff0c\u5c06\u7cbe\u7075\u548c\u6587\u672c\u8fdb\u884c<strong>\u300c\u5206\u79bb\u300d<\/strong>\uff08\u5173\u4e8e\u8fd9\u70b9\u53ef\u4ee5\u770b\u4e0b\u9762\u7684 <strong>\u300cUI\u5c42\u7ea7\u8c03\u6574\u300d<\/strong>\uff09\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6240\u6709 Label \u5f00\u542f CHAR \u6a21\u5f0f\uff0c\u5e76\u5728\u811a\u672c\u4e2d\u6bcf\u8fc7 0.2 \u79d2\u5c31\u5c06\u6587\u672c\u66f4\u6539\u6210\u65b0\u7684\u968f\u673a\u6570\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u5f15\u64ce\u4f1a\u5728\u8fd0\u884c\u65f6\u751f\u6210\u4e00\u5f20\u5305\u542b\u6570\u5b57 0 \u5230 9 \u7684 BMFont \u5b58\u5728\u5185\u5b58\u4e2d\uff0c\u53e6\u5916\u7531\u4e8e\u6211\u5c06\u6240\u6709 Label \u90fd\u805a\u5408\u5728\u4e00\u8d77\uff0c\u6240\u4ee5\u6240\u6709 Label \u7684\u6e32\u67d3\u5408\u5e76\u6210\u4e86 1 \u4e2a DrawCall\uff0c<strong>\u300c\u53e6\u5916\u8bf7\u7279\u522b\u5173\u6ce8\u5de6\u4e0b\u89d2\u7684\u5e27\u65f6\u95f4\u3001\u5e27\u7387\u548c\u6e32\u67d3\u8017\u65f6\u300d<\/strong>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5149\u770b\u4e0a\u9762\u7684\u56fe\u4f3c\u4e4e\u770b\u4e0d\u51fa\u4e2a\u6240\u4ee5\u7136\u6765\uff0c\u90a3\u6211\u4eec\u589e\u52a0\u4e00\u4e2a\u5bf9\u7167\u7ec4\uff0c<strong>\u300c\u5c06\u6240\u6709\u6587\u672c\u7684 Cache Mode \u9009\u9879\u8bbe\u4e3a\u9ed8\u8ba4\u7684 NONE \u6a21\u5f0f\u300d<\/strong>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6b64\u65f6\u53ef\u4ee5\u53d1\u73b0<strong>\u300c\u5e27\u65f6\u95f4\u6700\u9ad8\u8fbe\u5230\u4e86 2 ms\uff0c\u5e73\u5747\u5e27\u7387\u4e0b\u964d\u4e86\u5927\u6982 6 FPS\uff0c\u6e32\u67d3\u8017\u65f6\u66f4\u662f\u7ffb\u4e86 4 \u500d\u6700\u9ad8\u8fbe\u5230\u4e86 1.8 ms\u3002\u300d<\/strong><\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u603b\u7ed3<\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u7ed3\u8bba\u5df2\u7ecf\u5f88\u660e\u663e\u4e86\uff0c\u5bf9\u4e8e\u5927\u91cf\u9891\u7e41\u66f4\u6539\u7684\u6587\u672c\uff0c\u4f7f\u7528 CHAR \u6a21\u5f0f\u5e26\u6765\u7684\u6027\u80fd\u63d0\u5347\u662f\u975e\u5e38\u660e\u663e\u7684\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u540c\u65f6 CHAR \u6a21\u5f0f\u7684\u5c40\u9650\u4e5f\u5f88\u660e\u663e\uff0c\u4e00\u822c\u7528\u4e8e\u573a\u666f\u4e2d\u51fa\u73b0\u5927\u91cf\u6570\u5b57\u6587\u672c\uff0c\u7c7b\u4f3c\u4e8e\u7ecf\u9a8c\u503c\u589e\u52a0\u3001\u8840\u91cf\u51cf\u5c11\u4e4b\u7c7b\u7684\u7279\u6548\u7684\u60c5\u51b5\u3002<\/p>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\">UI \u5c42\u7ea7\u8c03\u6574<\/h3>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u9664\u4e86\u4ee5\u4e0a\u7684\u4f18\u5316\u65b9\u6848\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u5728\u6e38\u620f\u573a\u666f\u4e2d\u4e0b\u529f\u592b\uff0c\u5c06\u6027\u80fd\u4f18\u5316\u505a\u5230\u6781\u81f4\u3002<\/p><\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5176\u5b9e\u4e0a\u6587\u4e5f\u6709\u63d0\u5230\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7<strong>\u300c\u4f18\u5316\u8282\u70b9\u5c42\u7ea7\uff0c\u5206\u79bb\u56fe\u50cf\u8282\u70b9\u548c\u6587\u672c\u8282\u70b9\uff0c\u6587\u672c\u4f7f\u7528 BMFont \u6216 Cache Mode \u9009\u9879\uff0c\u5c3d\u91cf\u51fa\u73b0\u907f\u514d\u6587\u672c\u6253\u65ad\u6e32\u67d3\u5408\u6279\u7684\u60c5\u51b5\u300d<\/strong>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u7279\u522b\u662f\u5bf9\u4e8e\u6218\u6597\u573a\u666f\u4e2d\u5927\u91cf\u7684\u6587\u672c\u63d0\u793a\uff08\u4f24\u5bb3\u503c\u3001\u8840\u91cf\u503c\u548c\u6cd5\u529b\u503c\u7b49\u7b49\uff09\u6216\u5408\u6210\u6e38\u620f\u4e2d\u5927\u91cf\u7684\u7ecf\u9a8c\u503c\u6587\u672c\uff0c\u56e0\u4e3a\u8fd9\u4e9b\u6587\u672c\u57fa\u672c\u90fd\u662f\u6570\u5b57\uff0c\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f\u5373\u4f7f\u518d\u591a\u6587\u672c\u4e5f\u53ea\u9700\u8981 1 \u4e2a DrawCall \u5c31\u53ef\u4ee5\u5168\u90e8\u6e32\u67d3\u51fa\u6765\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e3e\u4e2a\u6817\u5b50<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e0b\u9762\u7684\u573a\u666f\u4e2d\uff0c\u6587\u672c\u5f00\u542f CHAR \u6a21\u5f0f\uff0c\u4f7f\u7528\u811a\u672c\u6bcf\u79d2\u751f\u6210 50 \u4e2a\u5de6\u53f3\u7684\u968f\u673a\u6570\u5b57\uff0c\u6587\u672c\u8282\u70b9\u7edf\u4e00\u653e\u5728 labelLayer \u8282\u70b9\u4e0b\uff0c\u8ba9\u6240\u6709\u6587\u672c\u53ef\u4ee5\u5171\u4eab 1 \u4e2a DrawCall\uff0c\u53e6\u5916\u80cc\u666f\u548c\u6930\u5b50\u5934\u5360 1 \u4e2a\uff0c\u5de6\u4e0b\u89d2 Profile \u5360 1 \u4e2a\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u53ef\u4ee5\u770b\u5230\u5373\u4f7f\u573a\u666f\u4e2d\u77ac\u95f4\u51fa\u73b0\u8fd9\u4e48\u591a\u6587\u672c\uff0c\u6574\u4f53\u6027\u80fd\u4e5f\u8fd8\u662f\u6bd4\u8f83\u53ef\u89c2\u7684\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\"><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u5f15\u64ce\u5728\u8fd0\u884c\u65f6\u4e3a\u6211\u4eec\u751f\u6210\u4e86\u4e00\u4efd\u5305\u542b\u6570\u5b57 0 \u5230 9 \u7684\u5168\u5c40\u5171\u4eab\u4f4d\u56fe\uff08BMFont\uff09\u3002<\/p>\n<p>\u5f53\u7136\u5982\u679c\u53ef\u4ee5\u5728 Label \u4e2d\u76f4\u63a5\u4f7f\u7528 BMFont \u7684\u8bdd\u90a3\u5c31\u66f4\u597d\u4e86\u3002<\/p><\/blockquote>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\"><\/figure>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u8865\u5145<\/h3>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u518d\u6b21\u63d0\u9192<\/h4>\n<ol class=\"list-paddingleft-2\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section>\u6539\u53d8\u6e32\u67d3\u72b6\u6001\u4f1a\u6253\u65ad\u6e32\u67d3\u5408\u6279\uff0c\u4f8b\u5982\u6539\u53d8\u7eb9\u7406\u72b6\u6001\uff08\u9884\u4e58\u3001\u5faa\u73af\u6a21\u5f0f\u548c\u8fc7\u6ee4\u6a21\u5f0f\uff09\u6216\u6539\u53d8 Material\uff08\u6750\u8d28\uff09\u3001Blend\uff08\u6df7\u5408\u6a21\u5f0f\uff09\u7b49\u7b49\uff0c\u6240\u4ee5\u4f7f\u7528\u81ea\u5b9a\u4e49 Shader \u4e5f\u4f1a\u6253\u65ad\u5408\u6279\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section>\u56fe\u96c6\u9ed8\u8ba4\u4e0d\u53c2\u4e0e\u52a8\u6001\u5408\u56fe\uff0c\u624b\u52a8\u5f00\u542f\u81ea\u52a8\u56fe\u96c6\u8d44\u6e90\u7684 Packable \u9009\u9879\u540e\u5982\u679c\u6700\u7ec8\u56fe\u96c6\u7b26\u5408\u52a8\u6001\u5408\u56fe\u8981\u6c42\u4e5f\u53ef\u4ee5\u53c2\u4e0e\u52a8\u6001\u5408\u56fe\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section>\u7eb9\u7406\u5f00\u542f Packable \u9009\u9879\u53c2\u4e0e\u52a8\u6001\u5408\u56fe\u540e\u65e0\u6cd5\u4f7f\u7528\u81ea\u5b9a\u4e49 Shader\uff0c\u56e0\u4e3a\u52a8\u6001\u5408\u56fe\u4f1a\u4fee\u6539\u539f\u59cb\u8d34\u56fe\u7684 UV \u5750\u6807\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section>\u4f7f\u7528 Cache Mode \u7684 BITMAP \u6a21\u5f0f\u9700\u8981\u6ce8\u610f\u5185\u5b58\u60c5\u51b5\uff0cCHAR \u6a21\u5f0f\u9700\u8981\u6ce8\u610f\u6587\u672c\u5185\u5bb9\u662f\u5426\u591a\u4e14\u4e0d\u91cd\u590d\u3002<\/p>\n<\/section>\n<\/li>\n<\/ol>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6700\u540e\u8fd8\u9700\u8981\u6ce8\u610f<\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728 Cocos Creator 2.0.7 \u4e4b\u524d\u7684\u7248\u672c\u4e2d\uff0c\u6539\u53d8\u8282\u70b9\u7684\u989c\u8272\u6216\u900f\u660e\u5ea6\u3001Sprite \u7ec4\u4ef6\u4f7f\u7528\u4e5d\u5bab\u683c\uff08Sliced\uff09\u90fd\u4f1a\u6253\u65ad\u6e32\u67d3\u5408\u6279\u3002<\/p>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" \/>\n<h1 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u76f8\u5173\u8d44\u6599<\/h1>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong>\u300cCocos Creator \u7528\u6237\u624b\u518c\u300d<\/strong>https:\/\/docs.cocos.com\/creator\/manual\/zh\/<\/p>\n<\/section>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u5728\u6e38\u620f\u5f00\u53d1\u4e2d\uff0cDrawCall \u4f5c\u4e3a\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u6027\u80fd\u6307\u6807\uff0c\u76f4\u63a5\u5f71\u54cd\u6e38\u620f\u7684\u6574\u4f53\u6027\u80fd\u8868\u73b0\u3002 \u65e0\u8bba\u662f Coc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":307,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[30],"tags":[32],"_links":{"self":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/767"}],"collection":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=767"}],"version-history":[{"count":1,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/767\/revisions"}],"predecessor-version":[{"id":768,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/767\/revisions\/768"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/media\/307"}],"wp:attachment":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=767"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}