{"id":60513,"date":"2026-01-15T18:57:56","date_gmt":"2026-01-15T10:57:56","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/60513.html"},"modified":"2026-01-15T18:57:56","modified_gmt":"2026-01-15T10:57:56","slug":"%e3%80%90%e8%8a%82%e7%82%b9%e3%80%91sign%e8%8a%82%e7%82%b9%e5%8e%9f%e7%90%86%e8%a7%a3%e6%9e%90%e4%b8%8e%e5%ae%9e%e9%99%85%e5%ba%94%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/60513.html","title":{"rendered":"\u3010\u8282\u70b9\u3011[Sign\u8282\u70b9]\u539f\u7406\u89e3\u6790\u4e0e\u5b9e\u9645\u5e94\u7528"},"content":{"rendered":"<p>\u3010Unity Shader Graph \u4f7f\u7528\u4e0e\u7279\u6548\u5b9e\u73b0\u3011\u4e13\u680f-\u76f4\u8fbe<\/p>\n<p>Sign \u8282\u70b9\u662f Unity URP Shader Graph \u4e2d\u4e00\u4e2a\u57fa\u7840\u4f46\u529f\u80fd\u5f3a\u5927\u7684\u6570\u5b66\u8fd0\u7b97\u8282\u70b9&#xff0c;\u5b83\u5728\u7740\u8272\u5668\u7f16\u7a0b\u4e2d\u626e\u6f14\u7740\u91cd\u8981\u7684\u89d2\u8272\u3002\u8be5\u8282\u70b9\u7684\u4e3b\u8981\u529f\u80fd\u662f\u5bf9\u8f93\u5165\u7684\u6bcf\u4e2a\u5206\u91cf\u8fdb\u884c\u7b26\u53f7\u5224\u65ad&#xff0c;\u6839\u636e\u8f93\u5165\u503c\u7684\u6b63\u8d1f\u60c5\u51b5\u8fd4\u56de\u5bf9\u5e94\u7684\u6574\u6570\u503c\u3002\u5177\u4f53\u6765\u8bf4&#xff0c;\u5bf9\u4e8e\u8f93\u5165\u5411\u91cf\u4e2d\u7684\u6bcf\u4e2a\u5206\u91cf&#xff0c;Sign \u8282\u70b9\u4f1a\u6267\u884c\u4ee5\u4e0b\u903b\u8f91\u5224\u65ad&#xff1a;<\/p>\n<ul>\n<li>\u5982\u679c\u8f93\u5165\u5206\u91cf\u7684\u503c\u5c0f\u4e8e\u96f6&#xff08;\u8d1f\u6570&#xff09;&#xff0c;\u5219\u8fd4\u56de -1<\/li>\n<li>\u5982\u679c\u8f93\u5165\u5206\u91cf\u7684\u503c\u7b49\u4e8e\u96f6&#xff0c;\u5219\u8fd4\u56de 0<\/li>\n<li>\u5982\u679c\u8f93\u5165\u5206\u91cf\u7684\u503c\u5927\u4e8e\u96f6&#xff08;\u6b63\u6570&#xff09;&#xff0c;\u5219\u8fd4\u56de 1<\/li>\n<\/ul>\n<p>\u8fd9\u79cd\u57fa\u4e8e\u7b26\u53f7\u7684\u5224\u65ad\u673a\u5236\u4f7f\u5f97 Sign \u8282\u70b9\u5728\u7740\u8272\u5668\u5f00\u53d1\u4e2d\u5177\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\u573a\u666f\u3002\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u7528\u4e8e\u7b80\u5355\u7684\u6570\u503c\u5206\u7c7b&#xff0c;\u8fd8\u80fd\u5728\u590d\u6742\u7684\u6750\u8d28\u6548\u679c\u4e2d\u5b9e\u73b0\u903b\u8f91\u63a7\u5236\u548c\u6761\u4ef6\u5224\u65ad\u3002\u4e0e\u4f20\u7edf\u7684 if-else \u8bed\u53e5\u76f8\u6bd4&#xff0c;Sign \u8282\u70b9\u5728 GPU \u4e0a\u6267\u884c\u6548\u7387\u66f4\u9ad8&#xff0c;\u56e0\u4e3a\u5b83\u5229\u7528\u4e86\u786c\u4ef6\u7684\u5e76\u884c\u8ba1\u7b97\u7279\u6027&#xff0c;\u80fd\u591f\u540c\u65f6\u5bf9\u5411\u91cf\u7684\u6240\u6709\u5206\u91cf\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<p>Sign \u8282\u70b9\u652f\u6301\u52a8\u6001\u77e2\u91cf\u7c7b\u578b&#xff0c;\u8fd9\u610f\u5473\u7740\u5b83\u53ef\u4ee5\u5904\u7406\u5404\u79cd\u7ef4\u5ea6\u7684\u6570\u636e&#xff0c;\u4ece\u7b80\u5355\u7684\u6d6e\u70b9\u6570\u5230\u56db\u7ef4\u5411\u91cf\u90fd\u80fd\u5b8c\u7f8e\u652f\u6301\u3002\u8fd9\u79cd\u7075\u6d3b\u6027\u4f7f\u5f97\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u4e2d\u4f7f\u7528\u540c\u4e00\u4e2a\u8282\u70b9&#xff0c;\u65e0\u8bba\u662f\u5904\u7406\u5355\u4e2a\u6570\u503c\u7684\u7b26\u53f7\u5224\u65ad&#xff0c;\u8fd8\u662f\u5bf9\u7eb9\u7406\u5750\u6807\u3001\u989c\u8272\u503c\u7b49\u590d\u6742\u6570\u636e\u8fdb\u884c\u6279\u91cf\u5904\u7406\u3002<\/p>\n<p>\u5728\u5b9e\u9645\u7684\u7740\u8272\u5668\u5f00\u53d1\u4e2d&#xff0c;Sign \u8282\u70b9\u5e38\u5e38\u4e0e\u5176\u4ed6\u6570\u5b66\u8282\u70b9\u7ed3\u5408\u4f7f\u7528&#xff0c;\u6784\u5efa\u51fa\u590d\u6742\u7684\u903b\u8f91\u5224\u65ad\u7f51\u7edc\u3002\u4f8b\u5982&#xff0c;\u5b83\u53ef\u4ee5\u4e0e Step \u8282\u70b9\u3001Compare \u8282\u70b9\u7b49\u914d\u5408&#xff0c;\u5b9e\u73b0\u66f4\u52a0\u7cbe\u7ec6\u7684\u6761\u4ef6\u63a7\u5236\u3002\u540c\u65f6&#xff0c;\u7531\u4e8e Sign \u8282\u70b9\u7684\u8f93\u51fa\u7ed3\u679c\u662f\u79bb\u6563\u7684\u6574\u6570\u503c&#xff0c;\u5b83\u7279\u522b\u9002\u5408\u7528\u4e8e\u521b\u5efa\u5206\u6bb5\u51fd\u6570\u3001\u5b9e\u73b0\u533a\u57df\u5212\u5206\u3001\u5236\u4f5c\u98ce\u683c\u5316\u6548\u679c\u7b49\u573a\u666f\u3002<\/p>\n<p>\u7406\u89e3 Sign \u8282\u70b9\u7684\u5de5\u4f5c\u539f\u7406\u5bf9\u4e8e\u638c\u63e1\u7740\u8272\u5668\u6570\u5b66\u8fd0\u7b97\u81f3\u5173\u91cd\u8981\u3002\u5b83\u4e0d\u4ec5\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u7b26\u53f7\u51fd\u6570&#xff0c;\u66f4\u662f\u8fde\u63a5\u8fde\u7eed\u6570\u5b66\u4e0e\u79bb\u6563\u903b\u8f91\u7684\u6865\u6881&#xff0c;\u5728\u89c6\u89c9\u6548\u679c\u521b\u4f5c\u4e2d\u53d1\u6325\u7740\u4e0d\u53ef\u66ff\u4ee3\u7684\u4f5c\u7528\u3002<\/p>\n<h3 id=\"\u7aef\u53e3\">\u7aef\u53e3<\/h3>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"543\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260115105755-6968c833d0ded.png\" width=\"544\" \/><\/p>\n<p>Sign \u8282\u70b9\u7684\u7aef\u53e3\u8bbe\u8ba1\u4f53\u73b0\u4e86\u5176\u529f\u80fd\u7684\u7b80\u6d01\u6027\u548c\u9ad8\u6548\u6027\u3002\u8282\u70b9\u5305\u542b\u4e24\u4e2a\u4e3b\u8981\u7aef\u53e3&#xff1a;\u8f93\u5165\u7aef\u53e3\u548c\u8f93\u51fa\u7aef\u53e3&#xff0c;\u8fd9\u79cd\u7b80\u7ea6\u7684\u8bbe\u8ba1\u4f7f\u5f97\u8282\u70b9\u6613\u4e8e\u7406\u89e3\u548c\u4f7f\u7528&#xff0c;\u540c\u65f6\u4fdd\u6301\u4e86\u5f3a\u5927\u7684\u529f\u80fd\u6269\u5c55\u6027\u3002<\/p>\n<h4 id=\"\u8f93\u5165\u7aef\u53e3\">\u8f93\u5165\u7aef\u53e3<\/h4>\n<p>\u8f93\u5165\u7aef\u53e3\u547d\u540d\u4e3a &#034;In&#034;&#xff0c;\u8fd9\u662f Sign \u8282\u70b9\u63a5\u6536\u6570\u636e\u7684\u5165\u53e3\u3002\u8be5\u7aef\u53e3\u5177\u6709\u4ee5\u4e0b\u91cd\u8981\u7279\u6027&#xff1a;<\/p>\n<ul>\n<li>\u65b9\u5411&#xff1a;\u8f93\u5165\u65b9\u5411&#xff0c;\u8868\u793a\u6570\u636e\u4ece\u6b64\u7aef\u53e3\u6d41\u5165\u8282\u70b9\u8fdb\u884c\u5904\u7406<\/li>\n<li>\u7c7b\u578b&#xff1a;\u52a8\u6001\u77e2\u91cf\u7c7b\u578b&#xff0c;\u8fd9\u662f Sign \u8282\u70b9\u6700\u5f3a\u5927\u7684\u7279\u6027\u4e4b\u4e00<\/li>\n<li>\u652f\u6301\u7684\u6570\u636e\u7c7b\u578b&#xff1a;\n<ul>\n<li>Float&#xff08;\u6d6e\u70b9\u6570&#xff09;&#xff1a;\u5904\u7406\u5355\u4e2a\u6570\u503c\u7684\u7b26\u53f7\u5224\u65ad<\/li>\n<li>Vector 2&#xff08;\u4e8c\u7ef4\u5411\u91cf&#xff09;&#xff1a;\u540c\u65f6\u5904\u7406\u4e24\u4e2a\u5206\u91cf\u7684\u7b26\u53f7<\/li>\n<li>Vector 3&#xff08;\u4e09\u7ef4\u5411\u91cf&#xff09;&#xff1a;\u9002\u7528\u4e8e\u989c\u8272\u3001\u5750\u6807\u7b49\u4e09\u7ef4\u6570\u636e<\/li>\n<li>Vector 4&#xff08;\u56db\u7ef4\u5411\u91cf&#xff09;&#xff1a;\u53ef\u5904\u7406 RGBA \u989c\u8272\u7b49\u56db\u7ef4\u6570\u636e<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u52a8\u6001\u77e2\u91cf\u7c7b\u578b\u7684\u652f\u6301\u610f\u5473\u7740 Sign \u8282\u70b9\u80fd\u591f\u81ea\u52a8\u9002\u5e94\u8fde\u63a5\u5230\u6b64\u7aef\u53e3\u7684\u4efb\u4f55\u6570\u636e\u7c7b\u578b\u3002\u5f53\u5f00\u53d1\u8005\u5c06\u4e0d\u540c\u7ef4\u5ea6\u7684\u6570\u636e\u8fde\u63a5\u5230 In \u7aef\u53e3\u65f6&#xff0c;\u8282\u70b9\u4f1a\u81ea\u52a8\u8c03\u6574\u5185\u90e8\u5904\u7406\u903b\u8f91&#xff0c;\u786e\u4fdd\u5bf9\u6bcf\u4e2a\u5206\u91cf\u90fd\u72ec\u7acb\u6267\u884c\u7b26\u53f7\u5224\u65ad\u3002\u8fd9\u79cd\u8bbe\u8ba1\u5927\u5927\u63d0\u9ad8\u4e86\u5de5\u4f5c\u6d41\u7a0b\u7684\u7075\u6d3b\u6027&#xff0c;\u5f00\u53d1\u8005\u65e0\u9700\u4e3a\u4e0d\u540c\u6570\u636e\u7c7b\u578b\u51c6\u5907\u4e0d\u540c\u7684 Sign \u8282\u70b9\u7248\u672c\u3002<\/p>\n<h4 id=\"\u8f93\u51fa\u7aef\u53e3\">\u8f93\u51fa\u7aef\u53e3<\/h4>\n<p>\u8f93\u51fa\u7aef\u53e3\u547d\u540d\u4e3a &#034;Out&#034;&#xff0c;\u8fd9\u662f Sign \u8282\u70b9\u5904\u7406\u7ed3\u679c\u7684\u51fa\u53e3\u3002\u8f93\u51fa\u7aef\u53e3\u7684\u8bbe\u8ba1\u4e0e\u8f93\u5165\u7aef\u53e3\u4fdd\u6301\u4e00\u81f4&#xff0c;\u786e\u4fdd\u6570\u636e\u7684\u8fde\u8d2f\u6027&#xff1a;<\/p>\n<ul>\n<li>\u65b9\u5411&#xff1a;\u8f93\u51fa\u65b9\u5411&#xff0c;\u5904\u7406\u540e\u7684\u6570\u636e\u4ece\u6b64\u7aef\u53e3\u6d41\u51fa<\/li>\n<li>\u7c7b\u578b&#xff1a;\u52a8\u6001\u77e2\u91cf\u7c7b\u578b&#xff0c;\u4e0e\u8f93\u5165\u7c7b\u578b\u5b8c\u5168\u5339\u914d<\/li>\n<li>\u8f93\u51fa\u7279\u6027&#xff1a;\u8f93\u51fa\u503c\u7684\u7ef4\u5ea6\u4e0e\u8f93\u5165\u503c\u5b8c\u5168\u4e00\u81f4&#xff0c;\u6bcf\u4e2a\u5206\u91cf\u90fd\u7ecf\u8fc7\u72ec\u7acb\u7684\u7b26\u53f7\u5224\u65ad<\/li>\n<\/ul>\n<p>\u8f93\u51fa\u7aef\u53e3\u7684\u52a8\u6001\u7279\u6027\u786e\u4fdd\u4e86\u6570\u636e\u6d41\u7684\u5b8c\u6574\u6027\u3002\u65e0\u8bba\u8f93\u5165\u7684\u662f\u6807\u91cf\u8fd8\u662f\u77e2\u91cf&#xff0c;\u8f93\u51fa\u90fd\u4f1a\u4fdd\u6301\u76f8\u540c\u7684\u7ed3\u6784&#xff0c;\u8fd9\u4f7f\u5f97 Sign \u8282\u70b9\u53ef\u4ee5\u65e0\u7f1d\u96c6\u6210\u5230\u590d\u6742\u7684\u8282\u70b9\u7f51\u7edc\u4e2d\u3002\u4f8b\u5982&#xff0c;\u5f53\u8f93\u5165\u4e00\u4e2a Vector3 \u7c7b\u578b\u7684\u989c\u8272\u6570\u636e\u65f6&#xff0c;\u8f93\u51fa\u4e5f\u4f1a\u662f Vector3 \u7c7b\u578b&#xff0c;\u5176\u4e2d\u6bcf\u4e2a\u989c\u8272\u5206\u91cf\u90fd\u88ab\u8f6c\u6362\u4e3a\u5bf9\u5e94\u7684\u7b26\u53f7\u503c\u3002<\/p>\n<h4 id=\"\u7aef\u53e3\u8fde\u63a5\u5b9e\u8df5\">\u7aef\u53e3\u8fde\u63a5\u5b9e\u8df5<\/h4>\n<p>\u5728\u5b9e\u9645\u4f7f\u7528\u4e2d&#xff0c;\u7aef\u53e3\u7684\u8fde\u63a5\u65b9\u5f0f\u76f4\u63a5\u5f71\u54cd\u7740\u8282\u70b9\u7684\u884c\u4e3a\u6548\u679c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u8fde\u63a5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>\u8fde\u63a5 Constant \u8282\u70b9\u5230 In \u7aef\u53e3&#xff0c;\u7528\u4e8e\u6d4b\u8bd5\u7279\u5b9a\u7684\u6570\u503c\u60c5\u51b5<\/li>\n<li>\u8fde\u63a5 Time \u8282\u70b9\u5230 In \u7aef\u53e3&#xff0c;\u521b\u5efa\u57fa\u4e8e\u65f6\u95f4\u7684\u7b26\u53f7\u5207\u6362\u6548\u679c<\/li>\n<li>\u8fde\u63a5 Texture Coordinate \u8282\u70b9\u5230 In \u7aef\u53e3&#xff0c;\u5b9e\u73b0\u57fa\u4e8eUV\u5750\u6807\u7684\u533a\u57df\u5212\u5206<\/li>\n<li>\u8fde\u63a5\u6570\u5b66\u8fd0\u7b97\u7f51\u7edc\u5230 In \u7aef\u53e3&#xff0c;\u6784\u5efa\u590d\u6742\u7684\u6761\u4ef6\u903b\u8f91<\/li>\n<\/ul>\n<p>\u7aef\u53e3\u7684\u8bbe\u8ba1\u54f2\u5b66\u4f53\u73b0\u4e86 Unity Shader Graph \u7684\u6838\u5fc3\u7406\u5ff5&#xff1a;\u7b80\u5355\u6613\u7528\u4e14\u529f\u80fd\u5f3a\u5927\u3002\u901a\u8fc7\u8fd9\u4e24\u4e2a\u7cbe\u5fc3\u8bbe\u8ba1\u7684\u7aef\u53e3&#xff0c;Sign \u8282\u70b9\u80fd\u591f\u878d\u5165\u5404\u79cd\u590d\u6742\u7684\u7740\u8272\u5668\u6548\u679c\u4e2d&#xff0c;\u4e3a\u89c6\u89c9\u6548\u679c\u827a\u672f\u5bb6\u63d0\u4f9b\u5f3a\u5927\u7684\u6570\u5b66\u5de5\u5177\u3002<\/p>\n<h3 id=\"\u751f\u6210\u7684\u4ee3\u7801\u793a\u4f8b\">\u751f\u6210\u7684\u4ee3\u7801\u793a\u4f8b<\/h3>\n<p>\u7406\u89e3 Sign \u8282\u70b9\u5728\u5e95\u5c42\u751f\u6210\u7684\u4ee3\u7801\u5bf9\u4e8e\u6df1\u5165\u5b66\u4e60\u7740\u8272\u5668\u7f16\u7a0b\u81f3\u5173\u91cd\u8981\u3002\u5f53\u5728 Shader Graph \u4e2d\u4f7f\u7528 Sign \u8282\u70b9\u65f6&#xff0c;Unity \u4f1a\u5728\u6700\u7ec8\u751f\u6210\u7684\u7740\u8272\u5668\u4ee3\u7801\u4e2d\u63d2\u5165\u76f8\u5e94\u7684\u51fd\u6570\u8c03\u7528\u3002\u8fd9\u4e9b\u751f\u6210\u7684\u4ee3\u7801\u4e0d\u4ec5\u53cd\u6620\u4e86\u8282\u70b9\u7684\u529f\u80fd\u5b9e\u73b0&#xff0c;\u8fd8\u5c55\u793a\u4e86 HLSL \u8bed\u8a00\u4e2d\u6570\u5b66\u51fd\u6570\u7684\u5b9e\u9645\u5e94\u7528\u3002<\/p>\n<h4 id=\"\u57fa\u7840\u4ee3\u7801\u7ed3\u6784\">\u57fa\u7840\u4ee3\u7801\u7ed3\u6784<\/h4>\n<p>Sign \u8282\u70b9\u751f\u6210\u7684\u6838\u5fc3\u4ee3\u7801\u901a\u5e38\u91c7\u7528\u51fd\u6570\u5c01\u88c5\u7684\u5f62\u5f0f&#xff0c;\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5178\u578b\u7684\u4ee3\u7801\u793a\u4f8b&#xff1a;<\/p>\n<p>HLSL<\/p>\n<p>void Unity_Sign_float4(float4 In, out float4 Out)<br \/>\n{<br \/>\n    Out &#061; sign(In);<br \/>\n}<\/p>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c55\u793a\u4e86\u5bf9\u56db\u7ef4\u5411\u91cf\u7684\u7b26\u53f7\u5224\u65ad\u5b9e\u73b0\u3002\u8ba9\u6211\u4eec\u8be6\u7ec6\u5206\u6790\u8fd9\u4e2a\u51fd\u6570\u7684\u5404\u4e2a\u7ec4\u6210\u90e8\u5206&#xff1a;<\/p>\n<ul>\n<li>\u51fd\u6570\u58f0\u660e&#xff1a;void Unity_Sign_float4(float4 In, out float4 Out)\u00a0\u5b9a\u4e49\u4e86\u4e00\u4e2a\u540d\u4e3a\u00a0Unity_Sign_float4\u00a0\u7684\u51fd\u6570&#xff0c;\u5b83\u63a5\u53d7\u4e00\u4e2a\u56db\u7ef4\u6d6e\u70b9\u5411\u91cf\u4f5c\u4e3a\u8f93\u5165&#xff0c;\u5e76\u901a\u8fc7\u8f93\u51fa\u53c2\u6570\u8fd4\u56de\u7ed3\u679c<\/li>\n<li>\u53c2\u6570\u8bf4\u660e&#xff1a;\n<ul>\n<li>float4 In&#xff1a;\u8f93\u5165\u7684\u56db\u7ef4\u5411\u91cf\u53c2\u6570<\/li>\n<li>out float4 Out&#xff1a;\u8f93\u51fa\u7684\u56db\u7ef4\u5411\u91cf\u53c2\u6570&#xff0c;out\u00a0\u5173\u952e\u5b57\u8868\u793a\u8be5\u53c2\u6570\u7528\u4e8e\u8f93\u51fa\u7ed3\u679c<\/li>\n<\/ul>\n<\/li>\n<li>\u51fd\u6570\u4f53&#xff1a;Out &#061; sign(In);\u00a0\u8fd9\u662f\u6838\u5fc3\u8ba1\u7b97\u90e8\u5206&#xff0c;\u8c03\u7528 HLSL \u5185\u7f6e\u7684\u00a0sign\u00a0\u51fd\u6570\u5bf9\u8f93\u5165\u5411\u91cf\u8fdb\u884c\u5904\u7406<\/li>\n<\/ul>\n<h4 id=\"\u4e0d\u540c\u6570\u636e\u7c7b\u578b\u7684\u53d8\u4f53\">\u4e0d\u540c\u6570\u636e\u7c7b\u578b\u7684\u53d8\u4f53<\/h4>\n<p>\u6839\u636e\u8f93\u5165\u6570\u636e\u7c7b\u578b\u7684\u4e0d\u540c&#xff0c;Unity \u4f1a\u81ea\u52a8\u751f\u6210\u76f8\u5e94\u7248\u672c\u7684\u51fd\u6570&#xff1a;<\/p>\n<p>HLSL<\/p>\n<p>\/\/ \u5904\u7406\u6d6e\u70b9\u6570\u7684\u7248\u672c<br \/>\nvoid Unity_Sign_float(float In, out float Out)<br \/>\n{<br \/>\n    Out &#061; sign(In);<br \/>\n}<\/p>\n<p>\/\/ \u5904\u7406\u4e8c\u7ef4\u5411\u91cf\u7684\u7248\u672c<br \/>\nvoid Unity_Sign_float2(float2 In, out float2 Out)<br \/>\n{<br \/>\n    Out &#061; sign(In);<br \/>\n}<\/p>\n<p>\/\/ \u5904\u7406\u4e09\u7ef4\u5411\u91cf\u7684\u7248\u672c<br \/>\nvoid Unity_Sign_float3(float3 In, out float3 Out)<br \/>\n{<br \/>\n    Out &#061; sign(In);<br \/>\n}<\/p>\n<p>\/\/ \u5904\u7406\u56db\u7ef4\u5411\u91cf\u7684\u7248\u672c<br \/>\nvoid Unity_Sign_float4(float4 In, out float4 Out)<br \/>\n{<br \/>\n    Out &#061; sign(In);<br \/>\n}<\/p>\n<p>\u8fd9\u79cd\u591a\u7248\u672c\u51fd\u6570\u7684\u8bbe\u8ba1\u786e\u4fdd\u4e86 Sign \u8282\u70b9\u80fd\u591f\u9ad8\u6548\u5904\u7406\u5404\u79cd\u7ef4\u5ea6\u7684\u6570\u636e&#xff0c;\u540c\u65f6\u4fdd\u6301\u4ee3\u7801\u7684\u6e05\u6670\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<h4 id=\"hlsl-\u5185\u7f6e-sign-\u51fd\u6570\u8be6\u89e3\">HLSL \u5185\u7f6e sign \u51fd\u6570\u8be6\u89e3<\/h4>\n<p>\u751f\u6210\u7684\u4ee3\u7801\u6838\u5fc3\u4f9d\u8d56\u4e8e HLSL \u7684\u5185\u7f6e\u00a0sign\u00a0\u51fd\u6570&#xff0c;\u8fd9\u4e2a\u51fd\u6570\u7684\u884c\u4e3a\u89c4\u8303\u5982\u4e0b&#xff1a;<\/p>\n<p>HLSL<\/p>\n<p>\/\/ sign \u51fd\u6570\u5bf9\u6bcf\u4e2a\u5206\u91cf\u7684\u5904\u7406\u903b\u8f91<br \/>\ncomponent_result &#061; (component_input &lt; 0) ? -1 :<br \/>\n                   (component_input &gt; 0) ? 1 : 0;<\/p>\n<p>\u8fd9\u79cd\u4e09\u5143\u8fd0\u7b97\u7b26\u7684\u5b9e\u73b0\u65b9\u5f0f\u786e\u4fdd\u4e86\u51fd\u6570\u7684\u9ad8\u6548\u6267\u884c\u3002\u5728 GPU \u5e76\u884c\u8ba1\u7b97\u73af\u5883\u4e2d&#xff0c;\u8fd9\u79cd\u57fa\u4e8e\u6761\u4ef6\u7684\u9009\u62e9\u64cd\u4f5c\u80fd\u591f\u5145\u5206\u5229\u7528\u786c\u4ef6\u7279\u6027&#xff0c;\u5b9e\u73b0\u9ad8\u6027\u80fd\u7684\u7b26\u53f7\u5224\u65ad\u3002<\/p>\n<h4 id=\"\u5b9e\u9645\u5e94\u7528\u4e2d\u7684\u4ee3\u7801\u96c6\u6210\">\u5b9e\u9645\u5e94\u7528\u4e2d\u7684\u4ee3\u7801\u96c6\u6210<\/h4>\n<p>\u5728\u5b8c\u6574\u7684\u7740\u8272\u5668\u4e2d&#xff0c;Sign \u8282\u70b9\u7684\u4ee3\u7801\u4f1a\u4e0e\u5176\u4ed6\u7740\u8272\u5668\u4ee3\u7801\u96c6\u6210&#xff1a;<\/p>\n<p>HLSL<\/p>\n<p>\/\/ \u9876\u70b9\u7740\u8272\u5668\u4e2d\u7684\u4f7f\u7528\u793a\u4f8b<br \/>\nv2f vert (appdata v)<br \/>\n{<br \/>\n    v2f o;<br \/>\n    \/\/ &#8230; \u5176\u4ed6\u9876\u70b9\u53d8\u6362\u4ee3\u7801<\/p>\n<p>    \/\/ \u4f7f\u7528 Sign \u8282\u70b9\u5904\u7406\u7684\u6570\u636e<br \/>\n    float4 worldPos &#061; mul(unity_ObjectToWorld, v.vertex);<br \/>\n    float4 signResult;<br \/>\n    Unity_Sign_float4(worldPos, signResult);<\/p>\n<p>    \/\/ \u5c06\u7ed3\u679c\u4f20\u9012\u7ed9\u7247\u6bb5\u7740\u8272\u5668<br \/>\n    o.signData &#061; signResult;<br \/>\n    return o;<br \/>\n}<\/p>\n<p>\/\/ \u7247\u6bb5\u7740\u8272\u5668\u4e2d\u7684\u4f7f\u7528\u793a\u4f8b<br \/>\nfixed4 frag (v2f i) : SV_Target<br \/>\n{<br \/>\n    \/\/ \u4f7f\u7528\u7b26\u53f7\u6570\u636e\u5f71\u54cd\u6700\u7ec8\u989c\u8272<br \/>\n    float3 coloredResult &#061; i.signData * _Color.rgb;<br \/>\n    return fixed4(coloredResult, 1.0);<br \/>\n}<\/p>\n<h4 id=\"\u6027\u80fd\u4f18\u5316\u8003\u8651\">\u6027\u80fd\u4f18\u5316\u8003\u8651<\/h4>\n<p>\u751f\u6210\u7684\u4ee3\u7801\u5728\u6027\u80fd\u65b9\u9762\u7ecf\u8fc7\u7cbe\u5fc3\u4f18\u5316&#xff1a;<\/p>\n<ul>\n<li>\u907f\u514d\u5206\u652f\u9884\u6d4b&#xff1a;\u4f7f\u7528\u6570\u5b66\u8fd0\u7b97\u800c\u975e\u6761\u4ef6\u8bed\u53e5&#xff0c;\u51cf\u5c11 GPU \u5206\u652f\u9884\u6d4b\u5931\u8d25\u7684\u5f00\u9500<\/li>\n<li>\u5411\u91cf\u5316\u64cd\u4f5c&#xff1a;\u5bf9\u5411\u91cf\u7684\u6240\u6709\u5206\u91cf\u540c\u65f6\u5904\u7406&#xff0c;\u5145\u5206\u5229\u7528 SIMD \u67b6\u6784\u4f18\u52bf<\/li>\n<li>\u5185\u8054\u51fd\u6570\u4f18\u5316&#xff1a;\u7b80\u5355\u7684\u51fd\u6570\u4f53\u4fbf\u4e8e\u7f16\u8bd1\u5668\u8fdb\u884c\u5185\u8054\u4f18\u5316&#xff0c;\u51cf\u5c11\u51fd\u6570\u8c03\u7528\u5f00\u9500<\/li>\n<\/ul>\n<p>\u7406\u89e3\u8fd9\u4e9b\u751f\u6210\u7684\u4ee3\u7801\u6709\u52a9\u4e8e\u5f00\u53d1\u8005\u66f4\u597d\u5730\u4f18\u5316\u7740\u8272\u5668\u6027\u80fd&#xff0c;\u5e76\u5728\u9700\u8981\u65f6\u76f4\u63a5\u7f16\u5199\u81ea\u5b9a\u4e49\u7684 HLSL \u4ee3\u7801\u6765\u5b9e\u73b0\u7279\u6b8a\u9700\u6c42\u3002<\/p>\n<h3 id=\"\u6570\u5b66\u539f\u7406\u4e0e\u8fd0\u7b97\u89c4\u5219\">\u6570\u5b66\u539f\u7406\u4e0e\u8fd0\u7b97\u89c4\u5219<\/h3>\n<p>Sign \u8282\u70b9\u80cc\u540e\u7684\u6570\u5b66\u539f\u7406\u57fa\u4e8e\u7b26\u53f7\u51fd\u6570\u7684\u6982\u5ff5&#xff0c;\u8fd9\u662f\u4e00\u4e2a\u5728\u6570\u5b66\u5206\u6790\u548c\u8ba1\u7b97\u673a\u56fe\u5f62\u5b66\u4e2d\u5e7f\u6cdb\u5e94\u7528\u7684\u57fa\u672c\u51fd\u6570\u3002\u6df1\u5165\u7406\u89e3\u8fd9\u4e9b\u6570\u5b66\u539f\u7406\u6709\u52a9\u4e8e\u5f00\u53d1\u8005\u66f4\u52a0\u6709\u6548\u5730\u8fd0\u7528 Sign \u8282\u70b9&#xff0c;\u5e76\u9884\u77e5\u5176\u5728\u4e0d\u540c\u60c5\u51b5\u4e0b\u7684\u884c\u4e3a\u8868\u73b0\u3002<\/p>\n<h4 id=\"\u7b26\u53f7\u51fd\u6570\u5b9a\u4e49\">\u7b26\u53f7\u51fd\u6570\u5b9a\u4e49<\/h4>\n<p>\u7b26\u53f7\u51fd\u6570&#xff08;Sign function&#xff09;\u5728\u6570\u5b66\u4e0a\u901a\u5e38\u8bb0\u4e3a sgn(x)&#xff0c;\u5176\u6b63\u5f0f\u5b9a\u4e49\u5982\u4e0b&#xff1a;<\/p>\n<p>sgn(x) &#061; {<br \/>\n    -1,  if x &lt; 0<br \/>\n     0,  if x &#061; 0<br \/>\n     1,  if x &gt; 0<br \/>\n}<\/p>\n<p>\u8fd9\u4e2a\u5b9a\u4e49\u4f53\u73b0\u4e86\u7b26\u53f7\u51fd\u6570\u7684\u4e09\u4e2a\u5173\u952e\u7279\u6027&#xff1a;<\/p>\n<ul>\n<li>\u79bb\u6563\u6027&#xff1a;\u8f93\u51fa\u503c\u4ec5\u9650\u4e8e\u4e09\u4e2a\u79bb\u6563\u7684\u6574\u6570<\/li>\n<li>\u5206\u6bb5\u6027&#xff1a;\u51fd\u6570\u6839\u636e\u8f93\u5165\u503c\u7684\u8303\u56f4\u5206\u4e3a\u4e09\u4e2a\u4e0d\u540c\u7684\u6bb5<\/li>\n<li>\u5947\u51fd\u6570\u7279\u6027&#xff1a;sgn(-x) &#061; -sgn(x)&#xff0c;\u5177\u5907\u5947\u51fd\u6570\u7684\u5bf9\u79f0\u6027\u8d28<\/li>\n<\/ul>\n<h4 id=\"\u5411\u91cf\u8fd0\u7b97\u7684\u6269\u5c55\">\u5411\u91cf\u8fd0\u7b97\u7684\u6269\u5c55<\/h4>\n<p>\u5f53 Sign \u8282\u70b9\u5904\u7406\u5411\u91cf\u6570\u636e\u65f6&#xff0c;\u6570\u5b66\u539f\u7406\u9700\u8981\u6269\u5c55\u5230\u591a\u7ef4\u60c5\u51b5\u3002\u5bf9\u4e8e n \u7ef4\u5411\u91cf V &#061; (v\u2081, v\u2082, &#8230;, v\u2099)&#xff0c;\u7b26\u53f7\u8fd0\u7b97\u5b9a\u4e49\u4e3a&#xff1a;<\/p>\n<p>sgn(V) &#061; (sgn(v\u2081), sgn(v\u2082), &#8230;, sgn(v\u2099))<\/p>\n<p>\u8fd9\u610f\u5473\u7740\u6bcf\u4e2a\u5206\u91cf\u90fd\u662f\u72ec\u7acb\u5904\u7406\u7684&#xff0c;\u5411\u91cf\u7b26\u53f7\u51fd\u6570\u7684\u7ed3\u679c\u662f\u4e00\u4e2a\u65b0\u7684\u5411\u91cf&#xff0c;\u5176\u4e2d\u6bcf\u4e2a\u5206\u91cf\u90fd\u662f\u5bf9\u5e94\u8f93\u5165\u5206\u91cf\u7684\u7b26\u53f7\u503c\u3002\u8fd9\u79cd\u5206\u91cf\u72ec\u7acb\u7684\u5904\u7406\u65b9\u5f0f\u786e\u4fdd\u4e86\u8fd0\u7b97\u7684\u5e76\u884c\u6027&#xff0c;\u975e\u5e38\u9002\u5408 GPU \u7684\u67b6\u6784\u7279\u70b9\u3002<\/p>\n<h4 id=\"\u7279\u6b8a\u6570\u503c\u5904\u7406\">\u7279\u6b8a\u6570\u503c\u5904\u7406<\/h4>\n<p>\u5728\u5b9e\u9645\u60c5\u51b5\u4e2d&#xff0c;\u5f00\u53d1\u8005\u9700\u8981\u4e86\u89e3 Sign \u8282\u70b9\u5bf9\u7279\u6b8a\u6570\u503c\u7684\u5904\u7406\u65b9\u5f0f&#xff1a;<\/p>\n<ul>\n<li>\u96f6\u503c\u5904\u7406&#xff1a;\u5f53\u8f93\u5165\u6070\u597d\u4e3a\u96f6\u65f6&#xff0c;\u8f93\u51fa\u4e3a\u96f6&#xff0c;\u8fd9\u662f\u6570\u5b66\u4e0a\u7684\u7cbe\u786e\u5b9a\u4e49<\/li>\n<li>\u8fd1\u4f3c\u96f6\u503c&#xff1a;\u7531\u4e8e\u6d6e\u70b9\u6570\u7684\u7cbe\u5ea6\u9650\u5236&#xff0c;\u6781\u5c0f\u7684\u6570\u503c\u53ef\u80fd\u88ab\u5224\u65ad\u4e3a\u6b63\u6570\u6216\u8d1f\u6570<\/li>\n<li>\u65e0\u7a77\u5927\u5904\u7406&#xff1a;\u6b63\u65e0\u7a77\u5927\u8fd4\u56de 1&#xff0c;\u8d1f\u65e0\u7a77\u5927\u8fd4\u56de -1<\/li>\n<li>NaN&#xff08;\u975e\u6570\u503c&#xff09;\u5904\u7406&#xff1a;\u6839\u636e HLSL \u89c4\u8303&#xff0c;\u5bf9 NaN \u7684\u7b26\u53f7\u5224\u65ad\u4f1a\u8fd4\u56de\u672a\u5b9a\u4e49\u7ed3\u679c&#xff0c;\u5b9e\u9645\u5e94\u7528\u4e2d\u5e94\u907f\u514d\u8fd9\u79cd\u60c5\u51b5<\/li>\n<\/ul>\n<h4 id=\"\u8fde\u7eed\u6027\u5206\u6790\">\u8fde\u7eed\u6027\u5206\u6790<\/h4>\n<p>\u4ece\u6570\u5b66\u5206\u6790\u7684\u89d2\u5ea6\u770b&#xff0c;\u7b26\u53f7\u51fd\u6570\u5728 x&#061;0 \u5904\u5b58\u5728\u95f4\u65ad\u70b9&#xff1a;<\/p>\n<p>lim(x\u21920\u207b) sgn(x) &#061; -1<br \/>\nlim(x\u21920\u207a) sgn(x) &#061; 1<br \/>\nsgn(0) &#061; 0<\/p>\n<p>\u8fd9\u79cd\u4e0d\u8fde\u7eed\u6027\u5728\u89c6\u89c9\u6548\u679c\u521b\u4f5c\u4e2d\u65e2\u5e26\u6765\u6311\u6218\u4e5f\u521b\u9020\u673a\u4f1a\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u5229\u7528\u8fd9\u79cd\u8df3\u8dc3\u7279\u6027\u521b\u5efa\u786c\u8fb9\u7f18\u6548\u679c&#xff0c;\u6216\u8005\u5728\u9700\u8981\u5e73\u6ed1\u8fc7\u6e21\u65f6\u7ed3\u5408\u5176\u4ed6\u51fd\u6570\u8fdb\u884c\u8f6f\u5316\u5904\u7406\u3002<\/p>\n<h4 id=\"\u4e0e\u5176\u4ed6\u51fd\u6570\u7684\u5173\u7cfb\">\u4e0e\u5176\u4ed6\u51fd\u6570\u7684\u5173\u7cfb<\/h4>\n<p>Sign \u8282\u70b9\u4e0e\u5176\u4ed6\u6570\u5b66\u51fd\u6570\u5b58\u5728\u91cd\u8981\u7684\u5173\u7cfb&#xff1a;<\/p>\n<ul>\n<li>\u7edd\u5bf9\u503c\u51fd\u6570&#xff1a;|x| &#061; x \u00d7 sgn(x)&#xff0c;\u8fd9\u4e2a\u5173\u7cfb\u5728\u6570\u5b66\u6052\u7b49\u5f0f\u4e2d\u7ecf\u5e38\u4f7f\u7528<\/li>\n<li>\u5355\u4f4d\u9636\u8dc3\u51fd\u6570&#xff1a;H(x) &#061; (sgn(x) &#043; 1) \/ 2&#xff0c;\u53ef\u5c06\u7b26\u53f7\u51fd\u6570\u8f6c\u6362\u4e3a 0-1 \u8303\u56f4\u7684\u9636\u8dc3\u51fd\u6570<\/li>\n<li>\u94b3\u5236\u51fd\u6570&#xff1a;clamp(x, 0, 1) &#061; (sgn(x &#8211; 0.5) &#043; 1) \/ 2&#xff0c;\u5c55\u793a\u4e86\u4e24\u8005\u4e4b\u95f4\u7684\u6570\u5b66\u8054\u7cfb<\/li>\n<\/ul>\n<p>\u7406\u89e3\u8fd9\u4e9b\u6570\u5b66\u5173\u7cfb\u6709\u52a9\u4e8e\u5f00\u53d1\u8005\u5728\u590d\u6742\u7684\u8282\u70b9\u7f51\u7edc\u4e2d\u5efa\u7acb\u66f4\u52a0\u9ad8\u6548\u7684\u8fde\u63a5\u65b9\u6848&#xff0c;\u907f\u514d\u5197\u4f59\u8ba1\u7b97\u3002<\/p>\n<h3 id=\"\u5b9e\u9645\u5e94\u7528\u573a\u666f\">\u5b9e\u9645\u5e94\u7528\u573a\u666f<\/h3>\n<p>Sign \u8282\u70b9\u5728\u7740\u8272\u5668\u5f00\u53d1\u4e2d\u62e5\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\u573a\u666f&#xff0c;\u4ece\u7b80\u5355\u7684\u903b\u8f91\u5224\u65ad\u5230\u590d\u6742\u7684\u89c6\u89c9\u6548\u679c\u90fd\u80fd\u89c1\u5230\u5b83\u7684\u8eab\u5f71\u3002\u638c\u63e1\u8fd9\u4e9b\u5e94\u7528\u573a\u666f\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u597d\u5730\u7406\u89e3\u4f55\u65f6\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u8fd9\u4e2a\u5f3a\u5927\u7684\u5de5\u5177\u3002<\/p>\n<h4 id=\"\u533a\u57df\u5212\u5206\u4e0e\u63a9\u7801\u751f\u6210\">\u533a\u57df\u5212\u5206\u4e0e\u63a9\u7801\u751f\u6210<\/h4>\n<p>Sign \u8282\u70b9\u6700\u76f4\u63a5\u7684\u5e94\u7528\u4e4b\u4e00\u662f\u521b\u5efa\u533a\u57df\u5212\u5206\u548c\u751f\u6210\u63a9\u7801\u3002\u901a\u8fc7\u7ed3\u5408\u5404\u79cd\u8f93\u5165\u6570\u636e&#xff0c;\u53ef\u4ee5\u521b\u5efa\u57fa\u4e8e\u7a7a\u95f4\u4f4d\u7f6e\u3001\u7eb9\u7406\u5750\u6807\u6216\u5176\u4ed6\u53c2\u6570\u7684\u4e8c\u8fdb\u5236\u63a9\u7801\u3002<\/p>\n<ul>\n<li>\n<p>\u57fa\u4e8e\u7a7a\u95f4\u4f4d\u7f6e\u7684\u533a\u57df\u5212\u5206&#xff1a;<\/p>\n<p>\u4f7f\u7528\u7269\u4f53\u7a7a\u95f4\u5750\u6807\u6216\u4e16\u754c\u7a7a\u95f4\u5750\u6807\u4f5c\u4e3a\u8f93\u5165&#xff0c;\u521b\u5efa\u4e0d\u540c\u533a\u57df\u7684\u6807\u8bc6\u3002\u4f8b\u5982&#xff0c;\u53ef\u4ee5\u5c06\u573a\u666f\u5212\u5206\u4e3a\u4e0a\u4e0b\u3001\u5de6\u53f3\u3001\u524d\u540e\u7b49\u4e0d\u540c\u533a\u57df&#xff0c;\u4e3a\u6bcf\u4e2a\u533a\u57df\u5e94\u7528\u4e0d\u540c\u7684\u6750\u8d28\u5c5e\u6027\u3002<\/p>\n<\/li>\n<li>\n<p>UV\u5750\u6807\u5206\u533a&#xff1a;<\/p>\n<p>\u5229\u7528\u7eb9\u7406\u5750\u6807\u521b\u5efa\u7f51\u683c\u72b6\u6216\u6247\u5f62\u7684\u533a\u57df\u5212\u5206\u3002\u8fd9\u79cd\u65b9\u6cd5\u7279\u522b\u9002\u5408\u5236\u4f5c\u68cb\u76d8\u683c\u6548\u679c\u3001\u8fdb\u5ea6\u6761\u586b\u5145\u3001\u6247\u5f62\u96f7\u8fbe\u56fe\u7b49UI\u5143\u7d20\u548c\u6e38\u620f\u6548\u679c\u3002<\/p>\n<\/li>\n<li>\n<p>\u8ddd\u79bb\u573a\u533a\u57df\u5212\u5206&#xff1a;<\/p>\n<p>\u7ed3\u5408\u8ddd\u79bb\u51fd\u6570\u4f7f\u7528&#xff0c;\u521b\u5efa\u57fa\u4e8e\u8ddd\u79bb\u7684\u540c\u5fc3\u5706\u6216\u7403\u5f62\u533a\u57df\u5212\u5206\u3002\u5f53\u8ddd\u79bb\u51fd\u6570\u7684\u68af\u5ea6\u53d8\u5316\u901a\u8fc7 Sign \u8282\u70b9\u65f6&#xff0c;\u53ef\u4ee5\u6e05\u6670\u5730\u6807\u8bc6\u51fa\u8fb9\u754c\u533a\u57df\u3002<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"\u6761\u4ef6\u903b\u8f91\u4e0e\u5f00\u5173\u63a7\u5236\">\u6761\u4ef6\u903b\u8f91\u4e0e\u5f00\u5173\u63a7\u5236<\/h4>\n<p>\u5728\u7740\u8272\u5668\u4e2d\u5b9e\u73b0\u6761\u4ef6\u903b\u8f91\u901a\u5e38\u9700\u8981\u907f\u514d\u4f20\u7edf\u7684if-else\u8bed\u53e5&#xff0c;\u800cSign\u8282\u70b9\u63d0\u4f9b\u4e86\u4e00\u79cd\u9ad8\u6548\u7684\u66ff\u4ee3\u65b9\u6848\u3002<\/p>\n<ul>\n<li>\n<p>\u6750\u8d28\u5c5e\u6027\u5207\u6362&#xff1a;<\/p>\n<p>\u6839\u636e\u67d0\u4e9b\u53c2\u6570&#xff08;\u5982\u89c6\u89d2\u89d2\u5ea6\u3001\u5149\u7167\u5f3a\u5ea6\u3001\u9876\u70b9\u989c\u8272\u7b49&#xff09;\u52a8\u6001\u5207\u6362\u4e0d\u540c\u7684\u6750\u8d28\u8868\u73b0\u3002Sign\u8282\u70b9\u53ef\u4ee5\u5c06\u8fde\u7eed\u7684\u53c2\u6570\u8f6c\u6362\u4e3a\u79bb\u6563\u7684\u9009\u62e9\u4fe1\u53f7\u3002<\/p>\n<\/li>\n<li>\n<p>\u52a8\u753b\u72b6\u6001\u63a7\u5236&#xff1a;<\/p>\n<p>\u5728\u9876\u70b9\u7740\u8272\u5668\u6216\u7247\u6bb5\u7740\u8272\u5668\u4e2d\u63a7\u5236\u52a8\u753b\u7684\u64ad\u653e\u72b6\u6001\u3002\u4f8b\u5982&#xff0c;\u6839\u636e\u65f6\u95f4\u53c2\u6570\u7684\u6b63\u8d1f\u6765\u51b3\u5b9a\u52a8\u753b\u7684\u524d\u8fdb\u6216\u540e\u9000\u64ad\u653e\u3002<\/p>\n<\/li>\n<li>\n<p>LOD&#xff08;\u7ec6\u8282\u5c42\u6b21&#xff09;\u63a7\u5236&#xff1a;<\/p>\n<p>\u6839\u636e\u89c2\u5bdf\u8ddd\u79bb\u6216\u5c4f\u5e55\u7a7a\u95f4\u5c3a\u5bf8\u81ea\u52a8\u5207\u6362\u4e0d\u540c\u7684\u7ec6\u8282\u7ea7\u522b\u3002Sign\u8282\u70b9\u53ef\u4ee5\u5e2e\u52a9\u786e\u5b9a\u5f53\u524d\u5e94\u8be5\u4f7f\u7528\u54ea\u4e2aLOD\u7ea7\u522b\u3002<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"\u98ce\u683c\u5316\u89c6\u89c9\u6548\u679c\">\u98ce\u683c\u5316\u89c6\u89c9\u6548\u679c<\/h4>\n<p>Sign \u8282\u70b9\u7684\u79bb\u6563\u8f93\u51fa\u7279\u6027\u4f7f\u5176\u7279\u522b\u9002\u5408\u521b\u5efa\u5404\u79cd\u98ce\u683c\u5316\u89c6\u89c9\u6548\u679c\u3002<\/p>\n<ul>\n<li>\n<p>\u5361\u901a\u7740\u8272\u4e0e\u8272\u5757\u5316&#xff1a;<\/p>\n<p>\u901a\u8fc7\u5c06\u8fde\u7eed\u7684\u5149\u7167\u8ba1\u7b97\u6216\u989c\u8272\u6e10\u53d8\u8f6c\u6362\u4e3a\u79bb\u6563\u7684\u8272\u9636&#xff0c;\u521b\u5efa\u5361\u901a\u98ce\u683c\u7684\u6e32\u67d3\u6548\u679c\u3002Sign\u8282\u70b9\u53ef\u4ee5\u5e2e\u52a9\u5b9a\u4e49\u4e0d\u540c\u8272\u5757\u4e4b\u95f4\u7684\u8fb9\u754c\u3002<\/p>\n<\/li>\n<li>\n<p>\u50cf\u7d20\u827a\u672f\u6548\u679c&#xff1a;<\/p>\n<p>\u7ed3\u5408\u53d6\u6574\u64cd\u4f5c\u548cSign\u8282\u70b9&#xff0c;\u521b\u5efa\u590d\u53e4\u7684\u50cf\u7d20\u827a\u672f\u98ce\u683c\u3002\u79bb\u6563\u7684\u7b26\u53f7\u8f93\u51fa\u5929\u7136\u9002\u5408\u8fd9\u79cd\u98ce\u683c\u5316\u7684\u8868\u8fbe\u3002<\/p>\n<\/li>\n<li>\n<p>\u6d77\u62a5\u5316\u6548\u679c&#xff1a;<\/p>\n<p>\u51cf\u5c11\u989c\u8272\u6570\u91cf&#xff0c;\u521b\u5efa\u7c7b\u4f3c\u6d77\u62a5\u7684\u89c6\u89c9\u6548\u679c\u3002Sign\u8282\u70b9\u53ef\u4ee5\u7528\u4e8e\u786e\u5b9a\u989c\u8272\u5206\u533a\u7684\u9608\u503c\u8fb9\u754c\u3002<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"\u6570\u5b66\u8fd0\u7b97\u8f85\u52a9\">\u6570\u5b66\u8fd0\u7b97\u8f85\u52a9<\/h4>\n<p>\u5728\u590d\u6742\u7684\u6570\u5b66\u8fd0\u7b97\u7f51\u7edc\u4e2d&#xff0c;Sign\u8282\u70b9\u7ecf\u5e38\u4f5c\u4e3a\u8f85\u52a9\u5de5\u5177\u51fa\u73b0\u3002<\/p>\n<ul>\n<li>\n<p>\u5411\u91cf\u65b9\u5411\u6807\u51c6\u5316&#xff1a;<\/p>\n<p>\u5c06\u4efb\u610f\u5411\u91cf\u8f6c\u6362\u4e3a\u5355\u4f4d\u65b9\u5411\u6307\u793a\u5411\u91cf&#xff0c;\u4fdd\u7559\u65b9\u5411\u4fe1\u606f\u4f46\u7edf\u4e00\u5e45\u5ea6\u3002\u8fd9\u5728\u67d0\u4e9b\u7269\u7406\u6a21\u62df\u548c\u7c92\u5b50\u7cfb\u7edf\u4e2d\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/li>\n<li>\n<p>\u5bfc\u6570\u7b26\u53f7\u5206\u6790&#xff1a;<\/p>\n<p>\u7ed3\u5408DDX\u3001DDY\u8282\u70b9\u4f7f\u7528&#xff0c;\u5206\u6790\u51fd\u6570\u5728\u5c4f\u5e55\u7a7a\u95f4\u4e2d\u7684\u53d8\u5316\u8d8b\u52bf\u3002Sign\u8282\u70b9\u53ef\u4ee5\u5feb\u901f\u5224\u65ad\u51fd\u6570\u662f\u5728\u589e\u52a0\u8fd8\u662f\u51cf\u5c11\u3002<\/p>\n<\/li>\n<li>\n<p>\u5750\u6807\u7cfb\u8f6c\u6362\u8f85\u52a9&#xff1a;<\/p>\n<p>\u5728\u81ea\u5b9a\u4e49\u5750\u6807\u7cfb\u8f6c\u6362\u4e2d&#xff0c;Sign\u8282\u70b9\u53ef\u4ee5\u5e2e\u52a9\u5904\u7406\u8c61\u9650\u5224\u65ad\u548c\u7b26\u53f7\u6821\u6b63\u3002<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"\u6027\u80fd\u4f18\u5316\u5e94\u7528\">\u6027\u80fd\u4f18\u5316\u5e94\u7528<\/h4>\n<p>\u5728\u67d0\u4e9b\u6027\u80fd\u654f\u611f\u7684\u573a\u666f\u4e2d&#xff0c;Sign\u8282\u70b9\u53ef\u4ee5\u66ff\u4ee3\u66f4\u590d\u6742\u7684\u8ba1\u7b97\u3002<\/p>\n<ul>\n<li>\n<p>\u5206\u652f\u6d88\u9664&#xff1a;<\/p>\n<p>\u7528\u6570\u5b66\u8fd0\u7b97\u66ff\u4ee3\u6761\u4ef6\u5206\u652f&#xff0c;\u63d0\u9ad8GPU\u6267\u884c\u6548\u7387\u3002\u8fd9\u5728\u79fb\u52a8\u5e73\u53f0\u548c\u6027\u80fd\u53d7\u9650\u7684\u73af\u5883\u4e2d\u7279\u522b\u91cd\u8981\u3002<\/p>\n<\/li>\n<li>\n<p>\u67e5\u627e\u8868\u7b80\u5316&#xff1a;<\/p>\n<p>\u5bf9\u4e8e\u7b80\u5355\u7684\u5206\u6bb5\u51fd\u6570&#xff0c;\u4f7f\u7528Sign\u8282\u70b9\u7ec4\u5408\u53ef\u4ee5\u907f\u514d\u7eb9\u7406\u67e5\u627e\u8868\u7684\u5f00\u9500\u3002<\/p>\n<\/li>\n<li>\n<p>\u65e9\u671f\u5254\u9664&#xff1a;<\/p>\n<p>\u5728\u7740\u8272\u5668\u8ba1\u7b97\u7684\u65e9\u671f\u9636\u6bb5\u4f7f\u7528Sign\u8282\u70b9\u8fdb\u884c\u5feb\u901f\u5224\u65ad&#xff0c;\u907f\u514d\u6267\u884c\u4e0d\u5fc5\u8981\u7684\u590d\u6742\u8ba1\u7b97\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u5e94\u7528\u573a\u666f\u5c55\u793a\u4e86Sign\u8282\u70b9\u7684\u591a\u6837\u6027\u548c\u5b9e\u7528\u6027\u3002\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d&#xff0c;\u521b\u9020\u6027\u7ec4\u5408Sign\u8282\u70b9\u4e0e\u5176\u4ed6Shader Graph\u8282\u70b9&#xff0c;\u53ef\u4ee5\u89e3\u51b3\u5404\u79cd\u590d\u6742\u7684\u6e32\u67d3\u6311\u6218\u3002<\/p>\n<h3 id=\"\u4e0e\u5176\u4ed6\u8282\u70b9\u7684\u7ec4\u5408\u4f7f\u7528\">\u4e0e\u5176\u4ed6\u8282\u70b9\u7684\u7ec4\u5408\u4f7f\u7528<\/h3>\n<p>Sign \u8282\u70b9\u7684\u771f\u6b63\u5a01\u529b\u5728\u4e8e\u5b83\u4e0e\u5176\u4ed6\u8282\u70b9\u7684\u521b\u9020\u6027\u7ec4\u5408\u3002\u901a\u8fc7\u6784\u5efa\u8282\u70b9\u7f51\u7edc&#xff0c;\u5f00\u53d1\u8005\u53ef\u4ee5\u5b9e\u73b0\u8fdc\u8fdc\u8d85\u51fa\u5355\u4e2a\u8282\u70b9\u80fd\u529b\u7684\u590d\u6742\u6548\u679c\u3002\u4ee5\u4e0b\u4ecb\u7ecd\u51e0\u79cd\u5e38\u89c1\u4e14\u5b9e\u7528\u7684\u7ec4\u5408\u65b9\u5f0f\u3002<\/p>\n<h4 id=\"\u4e0e\u6570\u5b66\u8282\u70b9\u7ec4\u5408\">\u4e0e\u6570\u5b66\u8282\u70b9\u7ec4\u5408<\/h4>\n<p>\u6570\u5b66\u8282\u70b9\u662f Sign \u8282\u70b9\u6700\u81ea\u7136\u7684\u5408\u4f5c\u4f19\u4f34&#xff0c;\u5b83\u4eec\u5171\u540c\u6784\u5efa\u4e86\u7740\u8272\u5668\u4e2d\u7684\u903b\u8f91\u548c\u8ba1\u7b97\u57fa\u7840\u3002<\/p>\n<ul>\n<li>\n<p>\u4e0e\u52a0\u6cd5\u8282\u70b9\u7ec4\u5408&#xff1a;<\/p>\n<p> \u7b26\u53f7\u8f6c\u6362&#xff1a;Sign \u2192 Add (\u52a01) \u2192 Multiply (\u4e580.5)<br \/>\n\u5c06\u8f93\u51fa\u8303\u56f4\u4ece[-1, 0, 1]\u8f6c\u6362\u4e3a[0, 0.5, 1]<\/p>\n<\/li>\n<li>\n<p>\u4e0e\u4e58\u6cd5\u8282\u70b9\u7ec4\u5408&#xff1a;<\/p>\n<p> \u6761\u4ef6\u7f29\u653e&#xff1a;Sign \u2192 Multiply \u2192 \u76ee\u6807\u53c2\u6570<br \/>\n\u6839\u636e\u7b26\u53f7\u5bf9\u6570\u503c\u8fdb\u884c\u65b9\u5411\u6027\u7f29\u653e&#xff0c;\u4fdd\u6301\u6bd4\u4f8b\u4f46\u7edf\u4e00\u65b9\u5411<\/p>\n<\/li>\n<li>\n<p>\u4e0e\u7edd\u5bf9\u503c\u8282\u70b9\u7ec4\u5408&#xff1a;<\/p>\n<p> \u7b26\u53f7\u5206\u79bb&#xff1a;Original \u2192 Sign &amp; Absolute \u2192 \u5206\u522b\u5904\u7406<br \/>\n\u5c06\u6570\u503c\u5206\u89e3\u4e3a\u7b26\u53f7\u548c\u5e45\u5ea6\u4e24\u90e8\u5206&#xff0c;\u72ec\u7acb\u8fdb\u884c\u5904\u7406<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"\u4e0e\u6bd4\u8f83\u8282\u70b9\u7ec4\u5408\">\u4e0e\u6bd4\u8f83\u8282\u70b9\u7ec4\u5408<\/h4>\n<p>\u6bd4\u8f83\u8282\u70b9\u4e0e Sign \u8282\u70b9\u5728\u529f\u80fd\u4e0a\u6709\u4e00\u5b9a\u7684\u91cd\u53e0&#xff0c;\u4f46\u5b83\u4eec\u7684\u7ec4\u5408\u53ef\u4ee5\u4ea7\u751f\u7cbe\u786e\u7684\u63a7\u5236\u6548\u679c\u3002<\/p>\n<ul>\n<li>\n<p>\u521b\u5efa\u4e09\u6001\u903b\u8f91&#xff1a;<\/p>\n<p> \u8f93\u5165 \u2192 Sign \u2192 \u4e24\u4e2aCompare\u8282\u70b9<br \/>\n\u5206\u522b\u68c0\u6d4b\u6b63\u8d1f\u72b6\u6001&#xff0c;\u5b9e\u73b0\u4e09\u79cd\u72b6\u6001\u7684\u7cbe\u786e\u63a7\u5236<\/p>\n<\/li>\n<li>\n<p>\u9608\u503c\u63a7\u5236&#xff1a;<\/p>\n<p> \u8f93\u5165 \u2192 Subtract (\u51cf\u53bb\u9608\u503c) \u2192 Sign \u2192 \u5176\u4ed6\u5904\u7406<br \/>\n\u521b\u5efa\u57fa\u4e8e\u81ea\u5b9a\u4e49\u9608\u503c\u7684\u7b26\u53f7\u5224\u65ad&#xff0c;\u800c\u975e\u56fa\u5b9a\u7684\u96f6\u503c\u9608\u503c<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"\u4e0e\u7eb9\u7406\u8282\u70b9\u7ec4\u5408\">\u4e0e\u7eb9\u7406\u8282\u70b9\u7ec4\u5408<\/h4>\n<p>\u7eb9\u7406\u6570\u636e\u4e0e Sign \u8282\u70b9\u7684\u7ed3\u5408\u53ef\u4ee5\u521b\u5efa\u57fa\u4e8e\u56fe\u50cf\u5185\u5bb9\u7684\u667a\u80fd\u6548\u679c\u3002<\/p>\n<ul>\n<li>\n<p>\u6cd5\u7ebf\u8d34\u56fe\u65b9\u5411\u5206\u6790&#xff1a;<\/p>\n<p> \u6cd5\u7ebf\u8d34\u56fe \u2192 Sign \u2192 \u989c\u8272\u8f93\u51fa<br \/>\n\u5feb\u901f\u53ef\u89c6\u5316\u6cd5\u7ebf\u8d34\u56fe\u5728\u4e0d\u540c\u65b9\u5411\u4e0a\u7684\u5206\u5e03\u60c5\u51b5<\/p>\n<\/li>\n<li>\n<p>\u9ad8\u5ea6\u56fe\u533a\u57df\u5212\u5206&#xff1a;<\/p>\n<p> \u9ad8\u5ea6\u56fe \u2192 Subtract (\u6d77\u5e73\u9762) \u2192 Sign \u2192 \u989c\u8272\u6df7\u5408<br \/>\n\u6839\u636e\u9ad8\u5ea6\u521b\u5efa\u9646\u5730\u548c\u6c34\u57df\u7684\u6e05\u6670\u5206\u754c<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"\u4e0e\u65f6\u95f4\u8282\u70b9\u7ec4\u5408\">\u4e0e\u65f6\u95f4\u8282\u70b9\u7ec4\u5408<\/h4>\n<p>\u65f6\u95f4\u52a8\u753b\u4e0e Sign \u8282\u70b9\u7684\u7ec4\u5408\u53ef\u4ee5\u521b\u5efa\u5404\u79cd\u5468\u671f\u6027\u6548\u679c\u3002<\/p>\n<ul>\n<li>\n<p>\u8109\u51b2\u4fe1\u53f7\u751f\u6210&#xff1a;<\/p>\n<p> Time \u2192 Sine \u2192 Sign \u2192 \u5176\u4ed6\u5e94\u7528<br \/>\n\u5c06\u6b63\u5f26\u6ce2\u8f6c\u6362\u4e3a\u65b9\u6ce2\u8109\u51b2\u4fe1\u53f7<\/p>\n<\/li>\n<li>\n<p>\u4ea4\u66ff\u52a8\u753b\u63a7\u5236&#xff1a;<\/p>\n<p> Time \u2192 Multiply (\u9891\u7387) \u2192 Fraction \u2192 Subtract (0.5) \u2192 Sign<br \/>\n\u521b\u5efa\u5728-1\u548c1\u4e4b\u95f4\u5468\u671f\u6027\u5207\u6362\u7684\u63a7\u5236\u4fe1\u53f7<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"\u9ad8\u7ea7\u7ec4\u5408\u6280\u5de7\">\u9ad8\u7ea7\u7ec4\u5408\u6280\u5de7<\/h4>\n<p>\u4e00\u4e9b\u66f4\u590d\u6742\u7684\u7ec4\u5408\u65b9\u5f0f\u5c55\u793a\u4e86 Sign \u8282\u70b9\u5728\u9ad8\u7ea7\u6548\u679c\u4e2d\u7684\u5e94\u7528\u3002<\/p>\n<ul>\n<li>\n<p>\u5411\u91cf\u573a\u53ef\u89c6\u5316&#xff1a;<\/p>\n<p> \u5411\u91cf\u6570\u636e \u2192 Normalize \u2192 Sign \u2192 \u989c\u8272\u7f16\u7801<br \/>\n\u5feb\u901f\u53ef\u89c6\u5316\u5411\u91cf\u573a\u5728\u4e0d\u540c\u8c61\u9650\u7684\u5206\u5e03<\/p>\n<\/li>\n<li>\n<p>\u8fb9\u7f18\u68c0\u6d4b\u589e\u5f3a&#xff1a;<\/p>\n<p> \u6df1\u5ea6\u56fe \u2192 DDX\/DDY \u2192 Sign \u2192 \u8fb9\u7f18\u7a81\u51fa<br \/>\n\u901a\u8fc7\u7b26\u53f7\u53d8\u5316\u68c0\u6d4b\u6df1\u5ea6\u4e0d\u8fde\u7eed\u533a\u57df&#xff0c;\u589e\u5f3a\u8fb9\u7f18\u6548\u679c<\/p>\n<\/li>\n<li>\n<p>\u7269\u7406\u6a21\u62df\u8f85\u52a9&#xff1a;<\/p>\n<p> \u901f\u5ea6\u5411\u91cf \u2192 Sign \u2192 \u963b\u529b\u65b9\u5411<br \/>\n\u5728\u7269\u7406\u6a21\u62df\u4e2d\u786e\u5b9a\u963b\u529b\u65b9\u5411&#xff0c;\u59cb\u7ec8\u4e0e\u8fd0\u52a8\u65b9\u5411\u76f8\u53cd<\/p>\n<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u7ec4\u5408\u4f7f\u7528\u7684\u4f8b\u5b50\u53ea\u662f\u51b0\u5c71\u4e00\u89d2&#xff0c;\u5b9e\u9645\u5f00\u53d1\u4e2d\u7684\u53ef\u80fd\u6027\u53ea\u53d7\u9650\u4e8e\u5f00\u53d1\u8005\u7684\u60f3\u8c61\u529b\u3002\u901a\u8fc7\u4e0d\u65ad\u5b9e\u9a8c\u4e0d\u540c\u7684\u8282\u70b9\u7ec4\u5408&#xff0c;\u53ef\u4ee5\u53d1\u73b0\u66f4\u591a\u521b\u9020\u6027\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<h3 id=\"\u6027\u80fd\u5206\u6790\u4e0e\u4f18\u5316\u5efa\u8bae\">\u6027\u80fd\u5206\u6790\u4e0e\u4f18\u5316\u5efa\u8bae<\/h3>\n<p>\u5728\u5b9e\u65f6\u56fe\u5f62\u5e94\u7528\u4e2d&#xff0c;\u6027\u80fd\u59cb\u7ec8\u662f\u5173\u952e\u7684\u8003\u8651\u56e0\u7d20\u3002\u867d\u7136 Sign \u8282\u70b9\u672c\u8eab\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u6570\u5b66\u8fd0\u7b97&#xff0c;\u4f46\u5728\u590d\u6742\u8282\u70b9\u7f51\u7edc\u4e2d\u7684\u4f7f\u7528\u65b9\u5f0f\u4f1a\u663e\u8457\u5f71\u54cd\u6574\u4f53\u6027\u80fd\u3002\u7406\u89e3\u5176\u6027\u80fd\u7279\u6027\u548c\u4f18\u5316\u7b56\u7565\u5bf9\u4e8e\u521b\u5efa\u9ad8\u6548\u7684\u7740\u8272\u5668\u81f3\u5173\u91cd\u8981\u3002<\/p>\n<h4 id=\"\u8ba1\u7b97\u590d\u6742\u5ea6\u5206\u6790\">\u8ba1\u7b97\u590d\u6742\u5ea6\u5206\u6790<\/h4>\n<p>Sign \u8282\u70b9\u5728 GPU \u4e0a\u7684\u6267\u884c\u6548\u7387\u901a\u5e38\u5f88\u9ad8&#xff0c;\u8fd9\u4e3b\u8981\u5f97\u76ca\u4e8e\u5176\u7b80\u5355\u7684\u6570\u5b66\u672c\u8d28\u3002<\/p>\n<ul>\n<li>\u6307\u4ee4\u6570\u91cf&#xff1a;\u5728\u5927\u591a\u6570 GPU \u67b6\u6784\u4e0a&#xff0c;\u7b26\u53f7\u8fd0\u7b97\u53ea\u9700\u8981 1-3 \u6761\u6307\u4ee4\u5373\u53ef\u5b8c\u6210<\/li>\n<li>\u5bc4\u5b58\u5668\u4f7f\u7528&#xff1a;Sign \u64cd\u4f5c\u901a\u5e38\u4e0d\u9700\u8981\u989d\u5916\u7684\u5bc4\u5b58\u5668&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u5728\u73b0\u6709\u5bc4\u5b58\u5668\u4e0a\u64cd\u4f5c<\/li>\n<li>\u5185\u5b58\u8bbf\u95ee&#xff1a;\u7eaf\u8ba1\u7b97\u64cd\u4f5c&#xff0c;\u4e0d\u6d89\u53ca\u7eb9\u7406\u91c7\u6837\u6216\u5185\u5b58\u8bfb\u5199&#xff0c;\u51cf\u5c11\u4e86\u5185\u5b58\u5e26\u5bbd\u538b\u529b<\/li>\n<\/ul>\n<hr \/>\n<p>\u3010Unity Shader Graph \u4f7f\u7528\u4e0e\u7279\u6548\u5b9e\u73b0\u3011\u4e13\u680f-\u76f4\u8fbe &#xff08;\u6b22\u8fce\u70b9\u8d5e\u7559\u8a00\u63a2\u8ba8&#xff0c;\u66f4\u591a\u4eba\u52a0\u5165\u8fdb\u6765\u80fd\u66f4\u52a0\u5b8c\u5584\u8fd9\u4e2a\u63a2\u7d22\u7684\u8fc7\u7a0b&#xff0c;&#x1f64f;&#xff09;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010Unity Shader Graph \u4f7f\u7528\u4e0e\u7279\u6548\u5b9e\u73b0\u3011\u4e13\u680f-\u76f4\u8fbe Sign \u8282\u70b9\u662f Unity URP Shader Graph \u4e2d\u4e00\u4e2a\u57fa\u7840\u4f46\u529f\u80fd\u5f3a\u5927\u7684\u6570\u5b66\u8fd0\u7b97\u8282\u70b9&#xff0c;\u5b83\u5728\u7740\u8272\u5668\u7f16\u7a0b\u4e2d\u626e\u6f14\u7740\u91cd\u8981\u7684\u89d2\u8272\u3002\u8be5\u8282\u70b9\u7684\u4e3b\u8981\u529f\u80fd\u662f\u5bf9\u8f93\u5165\u7684\u6bcf\u4e2a\u5206\u91cf\u8fdb\u884c\u7b26\u53f7\u5224\u65ad&#xff0c;\u6839\u636e\u8f93\u5165\u503c\u7684\u6b63\u8d1f\u60c5\u51b5\u8fd4\u56de\u5bf9\u5e94\u7684\u6574\u6570\u503c\u3002\u5177\u4f53\u6765\u8bf4&#xff0c;\u5bf9\u4e8e\u8f93\u5165\u5411\u91cf\u4e2d\u7684\u6bcf\u4e2a\u5206\u91cf&#xff0c;Sign \u8282\u70b9\u4f1a\u6267\u884c\u4ee5\u4e0b\u903b\u8f91\u5224\u65ad&#xff1a;<br \/>\n\u5982\u679c\u8f93\u5165\u5206\u91cf\u7684\u503c\u5c0f\u4e8e\u96f6&#xff08;\u8d1f\u6570&amp;#x<\/p>\n","protected":false},"author":2,"featured_media":60512,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6380,6382,6381,183,735],"topic":[],"class_list":["post-60513","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-shadergraph","tag-sign","tag-6381","tag-unity","tag-735"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u8282\u70b9\u3011[Sign\u8282\u70b9]\u539f\u7406\u89e3\u6790\u4e0e\u5b9e\u9645\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/60513.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u8282\u70b9\u3011[Sign\u8282\u70b9]\u539f\u7406\u89e3\u6790\u4e0e\u5b9e\u9645\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u3010Unity Shader Graph \u4f7f\u7528\u4e0e\u7279\u6548\u5b9e\u73b0\u3011\u4e13\u680f-\u76f4\u8fbe Sign \u8282\u70b9\u662f Unity URP Shader Graph \u4e2d\u4e00\u4e2a\u57fa\u7840\u4f46\u529f\u80fd\u5f3a\u5927\u7684\u6570\u5b66\u8fd0\u7b97\u8282\u70b9&#xff0c;\u5b83\u5728\u7740\u8272\u5668\u7f16\u7a0b\u4e2d\u626e\u6f14\u7740\u91cd\u8981\u7684\u89d2\u8272\u3002\u8be5\u8282\u70b9\u7684\u4e3b\u8981\u529f\u80fd\u662f\u5bf9\u8f93\u5165\u7684\u6bcf\u4e2a\u5206\u91cf\u8fdb\u884c\u7b26\u53f7\u5224\u65ad&#xff0c;\u6839\u636e\u8f93\u5165\u503c\u7684\u6b63\u8d1f\u60c5\u51b5\u8fd4\u56de\u5bf9\u5e94\u7684\u6574\u6570\u503c\u3002\u5177\u4f53\u6765\u8bf4&#xff0c;\u5bf9\u4e8e\u8f93\u5165\u5411\u91cf\u4e2d\u7684\u6bcf\u4e2a\u5206\u91cf&#xff0c;Sign \u8282\u70b9\u4f1a\u6267\u884c\u4ee5\u4e0b\u903b\u8f91\u5224\u65ad&#xff1a; \u5982\u679c\u8f93\u5165\u5206\u91cf\u7684\u503c\u5c0f\u4e8e\u96f6&#xff08;\u8d1f\u6570&amp;#x\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/60513.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-15T10:57:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260115105755-6968c833d0ded.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/60513.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/60513.html\",\"name\":\"\u3010\u8282\u70b9\u3011[Sign\u8282\u70b9]\u539f\u7406\u89e3\u6790\u4e0e\u5b9e\u9645\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-15T10:57:56+00:00\",\"dateModified\":\"2026-01-15T10:57:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/60513.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/60513.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/60513.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u8282\u70b9\u3011[Sign\u8282\u70b9]\u539f\u7406\u89e3\u6790\u4e0e\u5b9e\u9645\u5e94\u7528\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010\u8282\u70b9\u3011[Sign\u8282\u70b9]\u539f\u7406\u89e3\u6790\u4e0e\u5b9e\u9645\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/60513.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u8282\u70b9\u3011[Sign\u8282\u70b9]\u539f\u7406\u89e3\u6790\u4e0e\u5b9e\u9645\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u3010Unity Shader Graph \u4f7f\u7528\u4e0e\u7279\u6548\u5b9e\u73b0\u3011\u4e13\u680f-\u76f4\u8fbe Sign \u8282\u70b9\u662f Unity URP Shader Graph \u4e2d\u4e00\u4e2a\u57fa\u7840\u4f46\u529f\u80fd\u5f3a\u5927\u7684\u6570\u5b66\u8fd0\u7b97\u8282\u70b9&#xff0c;\u5b83\u5728\u7740\u8272\u5668\u7f16\u7a0b\u4e2d\u626e\u6f14\u7740\u91cd\u8981\u7684\u89d2\u8272\u3002\u8be5\u8282\u70b9\u7684\u4e3b\u8981\u529f\u80fd\u662f\u5bf9\u8f93\u5165\u7684\u6bcf\u4e2a\u5206\u91cf\u8fdb\u884c\u7b26\u53f7\u5224\u65ad&#xff0c;\u6839\u636e\u8f93\u5165\u503c\u7684\u6b63\u8d1f\u60c5\u51b5\u8fd4\u56de\u5bf9\u5e94\u7684\u6574\u6570\u503c\u3002\u5177\u4f53\u6765\u8bf4&#xff0c;\u5bf9\u4e8e\u8f93\u5165\u5411\u91cf\u4e2d\u7684\u6bcf\u4e2a\u5206\u91cf&#xff0c;Sign \u8282\u70b9\u4f1a\u6267\u884c\u4ee5\u4e0b\u903b\u8f91\u5224\u65ad&#xff1a; \u5982\u679c\u8f93\u5165\u5206\u91cf\u7684\u503c\u5c0f\u4e8e\u96f6&#xff08;\u8d1f\u6570&amp;#x","og_url":"https:\/\/www.wsisp.com\/helps\/60513.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-15T10:57:56+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260115105755-6968c833d0ded.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/60513.html","url":"https:\/\/www.wsisp.com\/helps\/60513.html","name":"\u3010\u8282\u70b9\u3011[Sign\u8282\u70b9]\u539f\u7406\u89e3\u6790\u4e0e\u5b9e\u9645\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-15T10:57:56+00:00","dateModified":"2026-01-15T10:57:56+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/60513.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/60513.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/60513.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u8282\u70b9\u3011[Sign\u8282\u70b9]\u539f\u7406\u89e3\u6790\u4e0e\u5b9e\u9645\u5e94\u7528"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/60513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=60513"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/60513\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/60512"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=60513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=60513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=60513"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=60513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}