{"id":272,"date":"2024-11-05T23:10:24","date_gmt":"2024-11-05T15:10:24","guid":{"rendered":"http:\/\/chenglixue.top\/?p=272"},"modified":"2026-04-19T23:24:14","modified_gmt":"2026-04-19T15:24:14","slug":"unity-%e9%a2%84%e7%a7%af%e5%88%86%e7%9a%ae%e8%82%a4%e6%b8%b2%e6%9f%93","status":"publish","type":"post","link":"http:\/\/chenglixue.top\/?p=272","title":{"rendered":"unity \u9884\u79ef\u5206\u76ae\u80a4\u6e32\u67d3"},"content":{"rendered":"<p><div class=\"has-toc have-toc\"><\/div><\/p>\n<h1>\u4ec0\u4e48\u662f\u6b21\u8868\u9762\u6563\u5c04\uff1f<\/h1>\n<p>\u5728\u6700\u4e3a\u5e38\u89c1\u7684BRDF\u4e2d\uff0c\u63cf\u8ff0\u4e86\u5149\u7ebf\u6253\u5230\u7269\u4f53\u8868\u9762\uff0c\u5982\u4f55\u53cd\u5c04\uff1b\u4f46\u9488\u5bf9\u4e0d\u540c\u7269\u4f53\uff0c\u5149\u7ebf\u5e76\u975e\u5168\u90e8\u90fd\u53cd\u5c04\u6216\u88ab\u5438\u6536\u3002\u5b58\u5728\u4e00\u4e9b\u7269\u4f53\uff0c\u5149\u7ebf\u4f1a\u7a7f\u8fc7\u5b83\u4eec\uff0c\u53d1\u751f\u6298\u5c04\u4ece\u53e6\u4e00\u9762\u5c04\u51fa\uff0c\u8fd9\u79cd\u73b0\u8c61\u88ab\u79f0\u4e4b\u4e3a\u900f\u5c04\uff0c\u5373\u4e3aBTDF\uff1bBSDF\u5bf9BRDF \u548c BTDF\u505a\u4e86\u878d\u5408\uff0c\u66f4\u6709BSSDF\u57fa\u4e8eBSDF\u8fdb\u884c\u4e86\u5347\u7ea7<br \/>\n<img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/pic.imgdb.cn\/item\/67232345d29ded1a8c003c7e.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/pic.imgdb.cn\/item\/67232345d29ded1a8c003c7e.png\" alt=\"\" \/><\/p><\/noscript>\n<p>\u5176\u4e2d\uff0c\u6b21\u8868\u9762\u6563\u5c04\u7528BSSDF\u6765\u8868\u793a\u3002\u5b83\u4e3b\u8981\u7528\u4e8e\u6a21\u62df\u76ae\u80a4\u3001\u7389\u77f3\u3001\u725b\u5976\u7b49\u534a\u900f\u5149\u6027\u7269\u8d28\u3002\u5bf9\u4e8e\u8fd9\u4e9b\u7269\u8d28\uff0c\u5149\u7ebf\u6253\u4e2d\u7269\u4f53\u540e\u7684\u6298\u5c04\u5149\u4e0d\u592a\u53ef\u80fd\u76f4\u63a5\u4ece\u53e6\u4e00\u4fa7\u900f\u5c04\u51fa\u4eba\u4f53\uff0c\u66f4\u53ef\u80fd\u5728\u67d0\u4e00\u5c42\u4ecb\u8d28\u4e2d\u7ecf\u8fc7\u4e86\u591a\u6b21\u5149\u8def\u6539\u53d8\uff0c\u6700\u540e\u51fa\u5c04\u5149\u4ee5\u4e00\u4e2a\u76f8\u5bf9\u968f\u673a\u7684\u89d2\u5ea6\u518d\u6b21\u56de\u5230\u5165\u5c04\u5149\u4e00\u4fa7\u7684\u7a7a\u6c14\u4e2d<\/p>\n<p><img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/pic.imgdb.cn\/item\/67232cfad29ded1a8c089219.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/pic.imgdb.cn\/item\/67232cfad29ded1a8c089219.png\" alt=\"\" \/><\/p><\/noscript>\n<p>\u5728\u6b21\u8868\u9762\u6563\u5c04\u4e2d\uff0c\u6f2b\u53cd\u5c04\u6765\u81ea\u4e8e\u8fd9\u4e9b\u91cd\u65b0\u56de\u5230\u7a7a\u6c14\u4e2d\u7684\u6298\u5c04\u5149\u3002\u5f53\u89c2\u5bdf\u5c3a\u5ea6\u8db3\u591f\u5c0f\uff0c\u4fbf\u4e0d\u80fd\u8fd1\u4f3c\u7684\u8ba4\u4e3a\u8fd9\u4e9b\u6f2b\u53cd\u5c04\u5149\u7684\u51fa\u5c04\u70b9\u6070\u597d\u4f4d\u4e8e\u5165\u5c04\u5149\u6240\u5728\u7684\u5165\u5c04\u70b9\u5904\uff0c\u800c\u662f\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u51fa\u5c04\u5149\u88ab\u8ba4\u4e3a\u5206\u5e03\u5728\u5165\u5c04\u5149\u5468\u56f4\u4e00\u5b9a\u8303\u56f4\u5185\uff08\u7eff\u8272\u5706\u5708\uff09\u3002\u5982\u679c\u4e0a\u56fe\u4e2d\u7eff\u8272\u5706\u5708\u7684\u533a\u57df\u6070\u597d\u843d\u5728\u67d0\u4e2a\u50cf\u7d20\u5185\uff0c\u5f97\u5230\u7684\u4f9d\u7136\u662f<strong>\u666e\u901a\u7684\u6f2b\u53cd\u5c04<\/strong>\u6548\u679c<\/p>\n<p>\u5bf9\u4e8e\u76ae\u80a4\u8fd9\u7c7b\u7279\u6b8a\u7684\u6b21\u8868\u9762\u6563\u5c04\u7269\u8d28\uff0c\u5f53\u5149\u7ebf\u7a7f\u900f\u6cb9\u8102\u548c\u4e0a\u76ae\u5c42\uff0c\u9047\u5230\u4eba\u4f53\u76ae\u80a4\u4e2d\u5bcc\u542b\u8840\u7ba1\u548c\u7ec4\u7ec7\u6db2\u7684\u771f\u76ae\u90e8\u5206\uff0c\u5149\u7ebf\u5f88\u53ef\u80fd\u4f1a\u6cbf\u7740\u5c40\u90e8\u7684\u5747\u8d28(\u8840\u6db2\uff0c\u7ec4\u7ec7\u6db2)\u505a\u8f83\u957f\u8303\u56f4\u7684\u6298\u5c04\u8fc1\u79fb\uff0c\u4ece\u800c\u5728\u7eff\u8272\u5706\u5708\u5916\u5c04\u51fa<\/p>\n<h1>\u76ae\u80a4\u7ec4\u6210<\/h1>\n<p>\u4e3a\u4e86\u8fd8\u539f\u76ae\u80a4\u9700\u8981\u4e86\u89e3\u76ae\u80a4\u5982\u4f55\u7ec4\u6210\u7684\uff0c\u4ee5\u53ca\u5b83\u4eec\u5bf9\u5149\u7ebf\u5982\u4f55\u4f5c\u7528\u3002\u76ae\u80a4\u7684\u7ec4\u6210\u7ed3\u6784\u5927\u81f4\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/pic.imgdb.cn\/item\/672328d0d29ded1a8c04f0a0.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/pic.imgdb.cn\/item\/672328d0d29ded1a8c04f0a0.png\" alt=\"\" \/><\/p><\/noscript>\n<ul>\n<li>\u8868\u9762\u6cb9\u8102\u5c42\uff08Thin Oily Layer\uff0c\u84dd\u8272\u90e8\u5206\uff09\uff1a\u6a21\u62df\u76ae\u80a4\u7684\u53cd\u5c04<\/li>\n<li>\u8868\u76ae\u5c42\uff08Epidermis\uff0c\u6d45\u6a59\u8272\u90e8\u5206\uff09\uff1a\u6a21\u62df\u6b21\u8868\u9762\u6563\u5c04\u7684\u8d21\u732e\u5c42<\/li>\n<li>\u771f\u76ae\u5c42\uff08Dermis\uff0c\u6df1\u6a59\u8272\u90e8\u5206\uff09\uff1a\u6a21\u62df\u6b21\u8868\u9762\u6563\u5c04\u7684\u8d21\u732e\u5c42<\/li>\n<\/ul>\n<p>\u76ae\u80a4\u5b58\u5728\u4e24\u79cd\u7279\u6027\uff1a<\/p>\n<ol>\n<li>\u968f\u673a\u6027\uff1a\u7531\u4e8e\u6750\u8d28\u5185\u90e8\u4ecb\u8d28\u901a\u5e38\u662f\u4e0d\u8fde\u7eed\u7684\uff0c\u4ee5\u53ca\u5927\u91cf\u6bdb\u7ec6\u8840\u7ba1\u548c\u91cc\u9762\u7684\u8840\u6db2\u6784\u6210\uff0c\u5149\u8def\u5728\u5185\u90e8\u7684\u6298\u5c04\/\u53cd\u5c04\u5f80\u5f80\u662f\u65e0\u89c4\u5f8b\u53ef\u5faa\u7684\uff0c\u5bfc\u81f4\u6700\u7ec8\u51fa\u5c04\u65f6\u65b9\u5411\u7684\u968f\u673a\u5316<\/li>\n<li>\u7535\u4ecb\u8d28\u7684\u7740\u8272\u6027(\u6f2b\u53cd\u5c04\u5149\u4f1a\u88ab\u67d3\u4e0a\u989c\u8272)\uff1a\u5149\u7ebf\u5728\u7269\u4f53\u5185\u90e8\u4f20\u64ad\u65f6\uff0c\u4e00\u90e8\u5206\u6ce2\u957f\u7684\u5149\u80fd\u88ab\u5438\u6536<\/li>\n<\/ol>\n<h1>\u6b21\u8868\u9762\u6563\u5c04\u7b97\u6cd5<\/h1>\n<h2>SSS<\/h2>\n<p>\u7c7b\u4f3c\u4e8e BRDF\uff0c\u4eba\u4eec\u4e13\u95e8\u4e3aSSS\u5f15\u5165\u4e86\u65b0\u7684\u65b9\u7a0bBSSDF\uff0c\u516c\u5f0f\u5982\u4e0b\uff1a<span class=\"katex math multi-line\">L_o(x_o, o) = \u222b_A R(&#124; x_i - x_o &#124;) \u222b_\u03a9 L_i(x_i, i)(i \u00b7 n_i) di dA<\/span><\/p>\n<ul>\n<li>\u200b     <span class=\"katex math inline\">L_o(x_o, o)<\/span>\uff1a\u6700\u7ec8\u5f97\u5230\u7684\u51fa\u5c04\u4f4d\u7f6e\u4e0e\u51fa\u5c04\u89d2\u5ea6\u4e0b\u7684\u4eae\u5ea6<span class=\"katex math inline\">L_o<\/span><\/p>\n<\/li>\n<li>\n<p>\u5728\u7ed9\u5b9a\u4e00\u4e2a\u8ba1\u7b97\u9762\u79ef<span class=\"katex math inline\">A<\/span>\u7684\u524d\u63d0\u4e0b\uff0c\u5bf9\u534a\u7403\u533a\u57df<span class=\"katex math inline\">\u03a9<\/span>\u6240\u6709\u5165\u5c04\u5149\u8fdb\u884c\u79ef\u5206<\/p>\n<ul>\n<li>\u5728\u79ef\u5206\u65f6\u9700\u8981\u8003\u8651\u5149\u7ebf\u5bf9\u8868\u9762\u6295\u5f71\u9020\u6210\u7684\u8870\u51cf\u2014\u2014<span class=\"katex math inline\">dot(i, n_i)<\/span>\uff0c\u5176\u4e2d<span class=\"katex math inline\">L_i(x_i, i)<\/span>\u8868\u793a\u5165\u5c04\u5149\u7ebf\u7684\u5165\u5c04\u4f4d\u7f6e\u548c\u5165\u5c04\u89d2\u5ea6\u4e0b\u7684\u4eae\u5ea6<span class=\"katex math inline\">L_i<\/span><\/p>\n<\/li>\n<li>\n<p>\u5f53\u524d\u79ef\u5206\u6700\u7ec8\u5f97\u5230\u7684\u662f<strong>\u5355\u4f4d\u9762\u79ef\u7684irradiance<\/strong><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u968f\u540e\u662f\u5bf9\u9762\u79efA\u79ef\u5206\uff0c\u51fd\u6570R\u548c\u534a\u7403\u533a\u57df<span class=\"katex math inline\">\u03a9<\/span>\u7684irradiance\u7684\u4e58\u79ef<\/p>\n<ul>\n<li>\u51fd\u6570R\u7684\u5b9e\u53c2\u662f<span class=\"katex math inline\">&#124; x_i - x_o &#124;<\/span>\uff0c\u610f\u4e3a<span class=\"katex math inline\">x_i<\/span> \u4e0e <span class=\"katex math inline\">x_o<\/span>\u7684\u8ddd\u79bb<\/p>\n<\/li>\n<li>\n<p><strong>R\u4e3a\u6a21\u7cca\u51fd\u6570<\/strong>\uff08\u5404\u79cd\u6a21\u7cca\u90fd\u53ef\u4ee5\uff0c\u4f46\u9700\u4fdd\u8bc1<strong>\u80fd\u91cf\u5b88\u6052<\/strong>\uff09\uff0c\u7528\u4e8e\u540e\u7eed<strong>\u8fd1\u4f3c\u6563\u5c04\u51fd\u6570<\/strong>\uff0c\u4f46\u8be5\u51fd\u6570\u6709\u4e2a\u9650\u5236\uff0c\u7531\u4e8e\u8be5\u51fd\u6570\u53ea\u5173\u5fc3\u5165\u5c04\u70b9\u548c\u51fa\u5c04\u70b9\uff0c\u4e0d\u5173\u5fc3\u51fa\u5c04\u65b9\u5411\u548c\u5165\u5c04\u65b9\u5411\uff0c\u56e0\u6b64\u53ea\u80fd\u7528\u4e8e<strong>\u5404\u5411\u540c\u6027<\/strong>\u7269\u4f53<\/p>\n<\/li>\n<li>\n<p>\u5f53\u524d\u79ef\u5206\u6700\u7ec8\u5f97\u5230\u7684\u662f<strong>\u9762\u79efA\u7684irradiance<\/strong><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>\u9884\u79ef\u5206(diffuse)<\/h2>\n<h3>\u6761\u4ef6<\/h3>\n<p>\u56e0\u4e3a\u9700\u8981\u6839\u636e\u67d0\u4e00\u65b9\u5411\u5f97\u5230\u67d0\u4e2a\u65b9\u5411\u51fa\u5c04\u7684irradiance\uff0c\u6240\u4ee5\u53ef\u4ee5\u770b\u5230BSSDF\u7684\u8ba1\u7b97\u65b9\u5f0f\u662f\u6bd4\u8f83\u6602\u8d35\u7684\u3002\u6709\u6ca1\u6709\u4ec0\u4e48\u65b9\u6cd5\u53ef\u4ee5\u4f18\u5316\u5462\uff1f\u5bf9\u4e8eSSS\u5e38\u7528\u5230\u7684\u65b9\u6cd5\u662f\u9884\u79ef\u5206\u2014\u2014<strong>\u5c06BSSDF\u7684\u90e8\u5206\u6216\u6574\u4f53\u9884\u5148\u8ba1\u7b97\u51fa\u6765\uff0c\u5e76\u4ee5\u4e00\u5b9a\u65b9\u5f0f\u4fdd\u5b58\u8fdb\u7eb9\u7406<\/strong><\/p>\n<p>\u4f46\u4e3a\u4e86\u786e\u4fdd\u9884\u8ba1\u7b97\u7684\u5185\u5bb9\u4e0d\u88ab\u6a21\u578b\u548c\u8868\u9762\u53c2\u6570\u6240\u675f\u7f1a\uff0c\u5c31\u5fc5\u987b\u9650\u5b9a<strong>\u79ef\u5206\u5bf9\u8c61\u7684\u6750\u8d28<\/strong>\uff0c\u5e76\u4e14<strong>\u4ec5\u9884\u8ba1\u7b97\u90a3\u4e9b\u4e0d\u53d8\u7684\u7ec4\u6210\u90e8\u5206<\/strong>\u3002\u8981\u6ee1\u8db3\u4ee5\u4e0a\u6761\u4ef6\uff0c\u9700\u8981\u505a\u5230\u4ee5\u4e0b\u4e09\u70b9\uff1a<\/p>\n<ol>\n<li><strong>\u5f27\u5ea6\u53d8\u5316<\/strong>\u7684\u6a21\u578b<\/li>\n<li><strong>\u6cd5\u7ebf\u6270\u52a8<\/strong>\uff1a\u8868\u9762\u6cd5\u7ebf\u5b8c\u5168\u6ca1\u6709\u6270\u52a8\u7684\u8bdd\uff0c\u90a3\u4e48\u5fae\u8868\u9762\u533a\u57df\u5b8c\u5168\u955c\u9762\u548c\u5e73\u5766\uff0cSSS\u5931\u53bb\u4e86\u5f62\u6210\u7ec6\u8282\u7279\u5f81\u7684\u6761\u4ef6\uff1b\u5982\u679c\u8868\u9762\u6cd5\u7ebf\u6270\u52a8\u8fc7\u4e8e\u9510\u5229\uff0c\u90a3\u4e48\u770b\u8d77\u6765\u6548\u679c\u4f1a\u4e0d\u597d<\/li>\n<li><strong>\u5149\u7ebf\u906e\u6321<\/strong>\uff1a\u5fc5\u987b\u5305\u542b\u9634\u5f71\uff0c\u4ece\u800c\u5f62\u6210\u5c40\u90e8\u7531\u6697\u81f3\u660e\u7684\u8f6c\u5411\uff0c\u907f\u514d\u5168\u65b9\u4f4d\u7684\u4eae\u5149\u9020\u6210SSS\u6548\u679c\u65e0\u6cd5\u88ab\u5bdf\u89c9<\/li>\n<\/ol>\n<h3>\u8fc7\u7a0b<\/h3>\n<p>\u9884\u79ef\u5206\u8fc7\u7a0b\u5206\u4e3a\u4e09\u6b65\uff1a<\/p>\n<ol>\n<li>\u5904\u7406\u5149\u7167\uff1a\u786e\u5b9a\u5165\u5c04\u51fd\u6570<span class=\"katex math inline\">L_i<\/span><\/li>\n<li>\u5904\u7406\u5fae\u8868\u9762\uff1a\u786e\u5b9a\u6563\u5c04\u5206\u5e03\u51fd\u6570<span class=\"katex math inline\">R<\/span><\/li>\n<li>\u5904\u7406\u906e\u853d\uff1a\u8ba1\u7b97\u5149\u7167\u7684\u6295\u5f71<span class=\"katex math inline\">dot(i, n_i)<\/span><\/li>\n<\/ol>\n<h3>\u5bf9\u8c61<\/h3>\n<p>\u9884\u79ef\u5206\u79ef\u5206\u7684\u662f\u76ae\u80a4\u8868\u9762<strong>\u6f2b\u53cd\u5c04<\/strong>\u5206\u91cf\uff0c\u4e0eBRDF\u6ce8\u91cd\u9ad8\u5149\u4e0d\u540c<\/p>\n<h3>\u63a8\u5bfc<\/h3>\n<p>\u7531\u4e8e\u9884\u79ef\u5206\u516c\u5f0f\u6709\u70b9\u957f\uff0c\u56e0\u6b64\u8fd9\u91cc\u4e3b\u8981\u4ecb\u7ecd\u6700\u91cd\u8981\u7684\u90e8\u5206<\/p>\n<p>\u5728\u5fae\u79ef\u5206\u4e2d\uff0c\u5bf9\u4e8e\u66f2\u9762\uff08\u6216\u66f2\u7ebf\uff09\u4e0a\u7684\u4efb\u610f\u4e00\u70b9 P\uff0c\u6211\u4eec\u90fd\u53ef\u4ee5\u627e\u5230\u4e00\u4e2a\u552f\u4e00\u80fd\u201c\u6700\u5b8c\u7f8e\u8d34\u5408\u201d\u8be5\u70b9\u5c40\u90e8\u5f62\u72b6\u7684\u5706\u3002\u8fd9\u4e2a\u5706\u88ab\u79f0\u4e3a<strong>\u5bc6\u5207\u5706<\/strong>\uff0c\u5bc6\u5207\u5706\u6b63\u662f\u7528\u4e8e\u63a8\u5bfc\u6f2b\u53cd\u5c04\u5206\u91cf\u7684\u7269\u7406\u6a21\u578b<\/p>\n<p>\u5148\u4ece\u7269\u7406\u6a21\u578b\u5f00\u59cb\uff1a<\/p>\n<p><img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/pic.imgdb.cn\/item\/67236421d29ded1a8c530068.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/pic.imgdb.cn\/item\/67236421d29ded1a8c530068.png\" alt=\"\" \/><\/p><\/noscript>\n<p>\u4e0a\u56fe(\u6765\u81eaGPU Pro2)\u4e2d\uff0c\u51e0\u4e2a\u70b9\u9700\u8981\u6ce8\u610f\uff1a<\/p>\n<ul>\n<li>\u5de6\u56fe\u8868\u793aBSSDF\u4e2d\u7684R\u51fd\u6570\uff08\u8fd1\u4f3c\u7684\u6563\u5c04\u51fd\u6570\uff09\uff0c\u5176\u4e2dx\u610f\u4e3a\u51fa\u5c04\u70b9\u548c\u5165\u5c04\u70b9\u7684\u8ddd\u79bb\uff0c\u8fd4\u56de\u503c\u4e3a\u8d21\u732e\u5f3a\u5ea6\n<ul>\n<li>\u7ea2\u84dd\u7eff\u4e09\u8272\u7684\u7ebf\u6761\u4ee3\u8868\u4e0d\u540c\u7684R\u51fd\u6570<\/li>\n<\/ul>\n<\/li>\n<li>\u53f3\u56fe\u4e3a\u62bd\u8c61\u7684\u51e0\u4f55\u6a21\u578b\uff08\u53ef\u4ee5\u60f3\u8c61\u4e3a\u4eba\u7684\u5934\uff09\uff0c\u7528\u4e8e\u8ba1\u7b97N\u65b9\u5411\u7684\u6f2b\u53cd\u5c04\u91cf\n<ul>\n<li>\u6cd5\u7ebfN\u548c\u5165\u5c04\u5149L\u7684\u5939\u89d2\u8bbe\u4e3a<span class=\"katex math inline\">\u03b8<\/span><\/li>\n<li>\u5706\u5f62\u534a\u5f84\u8bbe\u4e3a<span class=\"katex math inline\">r<\/span><\/li>\n<li><strong>N+\u03b8<\/strong>\u610f\u4e3a\u4eceN\u5f00\u59cb\u9006\u65f6\u9488\u65cb\u8f6c<strong>\u03b8<\/strong>\u89d2\u5bf9\u5e94\u7684\u4f4d\u7f6e<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u8fd9\u91cc\u5148\u76f4\u63a5\u7ed9\u51fa\u9884\u79ef\u5206\u516c\u5f0f\uff1a<span class=\"katex math multi-line\">D(\u03b8, r) = \\frac { \u222b^{\\frac{\u03a0}{2}} _{-\\frac{\u03a0}{2} } cos(\u03b8+x) R(2r sin(\\frac{x}{2})) dx }{ \u222b^{\\frac{\u03a0}{2}} _{-\\frac{\u03a0}{2} } R(2r sin(\\frac{x}{2})) dx }<\/span><\/p>\n<p>\u4e0e\u4e0a\u56fe\u4e0d\u540c\u7684\u662f\uff0c\u8be5\u516c\u5f0f\u5c06\u79ef\u5206\u533a\u57df\u7f29\u5c0f\u5230\u4e86\u534a\u7403\u533a\u57df\uff0c\u591a\u4e86\u53c2\u6570r\u3002\u8fd9\u662f\u56e0\u4e3a\u4e0a\u56fe\u5de6\u4fa7\u4e3b\u8981\u63cf\u8ff0x\u5bf9\u6563\u5c04\u7684\u8d21\u732e\u5f3a\u5ea6<\/p>\n<p>\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u5bf9\u4e8e\u5706\u5f62\u4e0a\u4efb\u610f\u4e00\u70b9Q\uff0c\u5b83\u7684\u5165\u5c04\u5149\u5f3a\u5ea6\u5982\u4e0b\uff1a\u5047\u8bbeOQ\u548cON\u7684\u5939\u89d2\u4e3ax(\u533a\u57df<span class=\"katex math inline\">[-\\frac{\u03a0}{2}, \\frac{\u03a0}{2}]<\/span>)\uff0c\u53ef\u4ee5\u6c42\u5f97Q\u70b9\u7684\u5165\u5c04\u5149\u5f3a\u5ea6\u4e3a<span class=\"katex math inline\">L_Q = L_i(dot(OQ, OL)) = L_i cos(\u03b8+x)<\/span><\/p>\n<p>\u4f46\u4e3b\u8981\u76ee\u6807\u5e76\u4e0d\u662f\u6c42\u534a\u5706\u4e0a\u4efb\u610f\u4e00\u4e2a\u70b9\u7684\u5165\u5c04\u5149\u5f3a\u5ea6\uff0c\u800c\u662f\u6c42<strong>\u534a\u5706\u4e0a\u6240\u6709\u5165\u5c04\u5149\u6563\u5c04\u540e\u5bf9N\u7684\u8d21\u732e\u5ea6<\/strong>\u3002\u56e0\u6b64\u8fd8\u9700\u8981\u4e00\u4e2a\u6563\u5c04\u7387<span class=\"katex math inline\">q(x)<\/span>\uff0c\u5b83\u8868\u793aQ\u70b9\u5230N\u70b9\u7684\u6563\u5c04\u6982\u7387\uff1b\u4f46\u8fd9\u8fd8\u4e0d\u591f\uff0c\u56e0\u4e3a\u8fd9\u91cc\u70b9Q\u7684\u5f27\u957f\u5e76\u4e0d\u4e3a1(\u56e0\u4e3a\u8fde\u7eed\u6982\u7387\u5bc6\u5ea6\u51fd\u6570\u7684\u539f\u56e0\uff0c\u4e0d\u80fd\u76f4\u63a5\u8bf4\u67d0\u4e2a\u70b9\u7684\u6982\u7387\u4e3a\u591a\u5c11\uff0c\u4f46\u53ef\u4ee5\u7528\u4e00\u5c0f\u6bb5\u533a\u95f4\u6765\u8868\u793a)\uff0c\u6240\u4ee5\u9700\u8981\u5229\u7528\u5fae\u5206\uff0c\u53ef\u5f97\u70b9Q\u7684\u5f27\u957f\u4e3a<span class=\"katex math inline\">\u0394x<\/span>\uff0c\u5bf9N\u7684\u8d21\u732e\u5ea6\u4e3a<span class=\"katex math inline\">L_i cos(\u03b8 + x) q(x) dx<\/span><br \/>\n<img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/pic.imgdb.cn\/item\/6723bffdd29ded1a8ca0ad8f.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/pic.imgdb.cn\/item\/6723bffdd29ded1a8ca0ad8f.png\" alt=\"\" \/><\/p><\/noscript>\n<p>\u56e0\u4e3a\u534a\u7403\u4e0a\u5f88\u53ef\u80fd\u5b58\u5728\u8bb8\u591a\u50cfQ\u70b9\u7c7b\u4f3c\u7684\u70b9\uff0c\u56e0\u6b64\u9700\u8981\u5bf9\u534a\u7403\u505a\u4e2a\u79ef\u5206\uff0c\u53ef\u5f97\uff1a<span class=\"katex math inline\">D(\u03b8) = \u222b ^{\\frac{\u03a0}{2}} _{- \\frac{\u03a0}{2}} L_i cos(\u03b8 + x) q(x) dx<\/span><\/p>\n<p>\u4f46\u5728\u524d\u9762\u63d0\u5230\u8fc7\uff0c\u8fd1\u4f3c\u7684\u6563\u5c04\u51fd\u6570R\uff0c\u5b83\u7684\u53c2\u6570\u662f\u5165\u5c04\u70b9\u548c\u51fa\u5c04\u70b9\u7684\u8ddd\u79bb\uff0c\u800c\u76ee\u524dx\u8868\u793a\u7684\u662fOQ\u548cON\u7684\u89d2\u5ea6\u5dee\uff0c\u8fd9\u4e5f\u5e76\u4e0d\u96be\uff0c\u5c06\u89d2\u5ea6\u5dee\u8f6c\u6362\u4e3a\u70b9Q\u548c\u70b9P\u7684\u8ddd\u79bb\u5373\u53ef\u2014\u2014<span class=\"katex math inline\">length = 2r sin(\\frac{\u03b8}{2})<\/span>\u3002\u53ef\u4ee5\u5f97\u5230<span class=\"katex math inline\">D(\u03b8) = \u222b ^{\\frac{\u03a0}{2}} _{- \\frac{\u03a0}{2}} L_i cos(\u03b8 + x) q(2r sin(\\frac{x}{2})) dx<\/span><\/p>\n<p>\u516c\u5f0f\u5269\u4e0b\u7684R\u90e8\u5206\u4e0d\u518d\u63a8\u5bfc\uff0c\u4e3b\u8981\u56f4\u7ed5\u4e24\u4e2a\u70b9\u5c55\u5f00\uff1a<\/p>\n<ol>\n<li>\u8fd1\u4f3c\u7684\u6563\u5c04\u51fd\u6570R\u9700\u8981<strong>\u8ba9\u7ed3\u679c\u770b\u7740\u4e0d\u9519<\/strong><\/li>\n<li>\u8fd1\u4f3c\u7684\u6563\u5c04\u51fd\u6570R\u9700\u8981<strong>\u6ee1\u8db3\u80fd\u91cf\u5b88\u6052<\/strong><\/li>\n<\/ol>\n<h3>\u751f\u6210\u9884\u79ef\u5206\u56fe<\/h3>\n<p>\u8fd9\u91cc\u5c31\u61d2\u5f97\u5199\u6210\u5de5\u5177\u4e86\uff0c\u76f4\u63a5\u7528\u811a\u672c\u914d\u5408compute shader\u5b9e\u73b0<\/p>\n<pre><code class=\"line-numbers\">using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing UnityEngine.Rendering;\n\npublic class PreIntegrateSSSLUT : MonoBehaviour\n{\n    public int resolution = 1024;\n    public RenderTexture SSSLUTRT;\n    public Texture2D SSSLUT;\n\n    void Start()\n    {\n        if (SSSLUTRT != null) RenderTexture.ReleaseTemporary(SSSLUTRT);\n        if (SSSLUT != null) Texture2D.Destroy(SSSLUT);\n        ComputeShader computeShader = Resources.Load&lt;ComputeShader&gt;(\"SSS\/CS_PreIntegrateSSSLUT\");\n        if (computeShader == null)\n        {\n            Debug.LogError(\"PreIntegrateSSSLUT compute shader is missing\");\n        }\n\n        SSSLUTRT = RenderTexture.GetTemporary(resolution, resolution, 0, RenderTextureFormat.ARGBHalf, RenderTextureReadWrite.Default);\n        SSSLUTRT.enableRandomWrite = true;\n        SSSLUT = new Texture2D(resolution, resolution, TextureFormat.RGB24, true, true);\n\n        var kernelIndex = computeShader.FindKernel(\"PreIntegrateSSSLUT\");\n        computeShader.SetTexture(kernelIndex, \"_RW_OutputTex\", SSSLUTRT);\n        computeShader.SetVector(\"_SSSLUTSize\", new Vector4(resolution, resolution, 1f \/ resolution, 1f \/ resolution));\n        computeShader.Dispatch(kernelIndex, resolution \/ 8, resolution \/ 8, 1);\n\n        RenderTexture.active = SSSLUTRT;\n        SSSLUT.ReadPixels(new Rect(0, 0, resolution, resolution), 0, 0);\n        RenderTexture.active = null;\n\n        System.IO.File.WriteAllBytes(\"Assets\/Resources\/Tex\/SSSLut.jpg\", SSSLUT.EncodeToJPG());\n    }\n\n    private void OnDestroy()\n    {\n        RenderTexture.ReleaseTemporary(SSSLUTRT);\n        Texture2D.Destroy(SSSLUT);\n    }\n}\n<\/code><\/pre>\n<pre><code class=\"line-numbers\">#pragma once\n#include \"Assets\/Resources\/Library\/Common.hlsl\"\n\n#pragma kernel PreIntegrateSSSLUT\n\nRWTexture2D&lt;float4&gt; _RW_OutputTex;\n\nfloat4 _SSSLUTSize;\n\nfloat3 Gaussian(float v,float r)\n{\n    return 1.0\/sqrt(2.0 * PI * v) * exp(-(r*r)\/(2.0*v));\n}\nfloat3 ApproximateScatter(float r)\n{\n    return float3(0.0, 0.0, 0.0)\n        + Gaussian(0.0064, r) * float3(0.233, 0.455, 0.649)\n        + Gaussian(0.0484, r) * float3(0.100, 0.336, 0.344)\n        + Gaussian(0.187, r) * float3(0.118, 0.198, 0.0)\n        + Gaussian(0.567, r) * float3(0.113, 0.007, 0.007)\n        + Gaussian(1.99, r) * float3(0.358, 0.004, 0.0)\n        + Gaussian(7.41, r) * float3(0.233, 0.0, 0.0);\n}\n\nfloat3 GetLUT(float2 uv)\n{\n    float NoL = uv.x;\n    float oneOverR = uv.y;\n\n    float theta = acos(NoL * 2.f - 1.f);\n    float radius = 1.f \/ oneOverR;\n\n    float3 totalWeight = 0.f, totalLight = 0.f;\n    for(float x = -PI \/ 2; x &lt;= PI \/ 2; x+= PI * 0.001f)\n    {\n        float sampleDistance = abs(2.f * radius * sin(x \/ 2));\n        float3 weight = ApproximateScatter(sampleDistance);\n\n        totalWeight += weight;\n        totalLight += saturate(cos(theta + x)) * weight;\n    }\n\n    float3 result = totalLight \/ totalWeight;\n\n    return result;\n}\n\n[numthreads(8,8,1)]\nvoid PreIntegrateSSSLUT (uint3 id : SV_DispatchThreadID)\n{\n    float2 uv = ((float2)id.xy + 0.5f) \/ _SSSLUTSize;\n    _RW_OutputTex[id.xy] = float4(GetLUT(uv), 1.f);\n}\n\n<\/code><\/pre>\n<p>\u53ef\u4ee5\u5f97\u5230\u5982\u4e0b\u7ed3\u679c\uff1a<br \/>\n<img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/pic.imgdb.cn\/item\/672731e1d29ded1a8c6ae104.jpg\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/pic.imgdb.cn\/item\/672731e1d29ded1a8c6ae104.jpg\" alt=\"\" \/><\/p><\/noscript>\n<p>\u6a2a\u5750\u6807\u662fNoL\uff0c\u7eb5\u5750\u6807\u662f<span class=\"katex math inline\">\\frac{1}{r}<\/span><\/p>\n<h3>\u5982\u4f55\u4f7f\u7528<\/h3>\n<p>\u5982\u4f55\u91c7\u6837\u8be5\u9884\u79ef\u5206\u56fe\u5462\uff1f\u5176\u5b9e\u5c31\u662f\u9700\u8981\u77e5\u9053NoL\u3001<span class=\"katex math inline\">\\frac{1}{r}<\/span><\/p>\n<ul>\n<li>NoL\uff1a\u8fd9\u90e8\u5206\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u83b7\u5f97\u5149\u6e90\u5411\u91cf\u3001\u7269\u4f53\u7684normal\u3002\u4f46\u9700\u6ce8\u610f\uff0cnormal<strong>\u5c3d\u91cf\u4f7f\u7528\u6cd5\u7ebf\u8d34\u56fe<\/strong>\uff0c\u8fd9\u6837\u53ef\u4ee5\u91c7\u6837\u6cd5\u7ebf\u8d34\u56fe\u7684mipmap\uff0c\u9632\u6b62\u51fa\u73b0\u751f\u786c\u7684\u8fb9\u7f18<\/p>\n<\/li>\n<li>\n<p>$\\frac{1}{r}$\uff1ar\u610f\u4e3a\u534a\u5f84\uff0c\u4f46$\\frac{1}{r}$\u662f\u4f55\u610f\u5473\u5462\uff1f$\\frac{1}{r}$\u8868\u793a\u8868\u9762\u7684\u5c40\u90e8\u66f2\u7387<\/p>\n<ul>\n<li>\u7406\u89e3\u66f2\u7387<\/li>\n<\/ul>\n<p>\u5047\u8bbe\u6211\u4eec\u5728\u5f00\u8f66<\/p>\n<p>\u5f53\u8f66\u8f86\u5b8c\u5168\u76f4\u7ebf\u884c\u9a76\uff0c\u66f2\u7387\u4e3a0<\/p>\n<p>\u5f53\u9047\u5230\u5c0f\u8f6c\u5f2f\u7684\u8def\u53e3\uff0c\u53ea\u9700\u8f7b\u6253\u65b9\u5411\u76d8\uff0c\u6cbf\u7740\u5706\u5f27\u8f6c\u5f2f\uff0c\u6211\u4eec\u611f\u89c9\u6709\u70b9\u5f2f\uff0c\u66f2\u7387\u5f88\u5c0f<\/p>\n<p>\u5f53\u9047\u5230\u5927\u8f6c\u5f2f\u7684\u8def\u53e3\uff0c\u9700\u8981\u731b\u6253\u65b9\u5411\u76d8\u751a\u81f3\u6253\u6b7b\uff0c\u6cbf\u7740\u4e00\u4e2a\u975e\u5e38\u5c0f\u7684\u5706\u5f27\u8f6c\u5f2f\uff0c\u8fd9\u4e2a\u5706\u7684\u534a\u5f84 r \u6781\u5c0f\uff0c\u66f2\u7387\u6781\u5927<\/p>\n<ul>\n<li>\u534a\u5f84 r \u8d8a\u5c0f\uff0c\u8868\u9762\u8d8a\u5c16\u9510\uff0c<span class=\"katex math inline\">\\frac{1}{r}<\/span>\u8d8b\u8fd1\u4e8e1\uff0c\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u51fa\uff0c\u5f97\u5230\u7684<strong>\u6563\u5c04\u6548\u679c\u90fd\u63d0\u9ad8<\/strong>\u4e86\uff0c\u4e14\u5e26\u6709\u7ea2\u8272\uff1b\u534a\u5f84 r \u8d8a\u5927\uff0c\u8868\u9762\u770b\u8d77\u6765\u8d8a\u5e73\u5766\uff0c<span class=\"katex math inline\">\\frac{1}{r}<\/span>\u8d8b\u8fd1\u4e8e0\uff0c\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u51fa\uff0c\u5f97\u5230\u7684\u6563\u5c04\u6548\u679c\u66f4\u63a5\u8fd1\u4e8e\u666e\u901a\u7684\u660e\u6697\u5149\u7167\uff0c\u5e76<strong>\u65e0\u660e\u663e\u7684SSS\u6548\u679c<\/strong><\/p>\n<\/li>\n<li>\n<p>\u4f46\u95ee\u9898\u5728\u4e8e\u5982\u4f55\u5f97\u5230<span class=\"katex math inline\">\\frac{1}{r}<\/span>?<\/p>\n<\/li>\n<\/ul>\n<p>\u5728\u5fae\u79ef\u5206\u4e2d\uff0c\u66f2\u7387\u5b9a\u4e49\u4e3a<strong>\u8868\u9762\u6cd5\u7ebf\u968f\u7a7a\u95f4\u4f4d\u7f6e\u53d8\u5316\u7684\u901f\u7387<\/strong><\/p>\n<p>\u5047\u8bbe\u5728\u6a21\u578b\u8868\u9762\u79fb\u52a8\u4e00\u5c0f\u6bb5\u8ddd\u79bb<span class=\"katex math inline\">\u0394P<\/span>(\u5f27\u957f)\uff0c\u6cd5\u7ebf\u65b9\u5411N\u4e5f\u968f\u4e4b\u6539\u53d8\u4e86\u89d2\u5ea6<span class=\"katex math inline\">\u0394\u03b8<\/span>\uff0c\u6839\u636e\u5706\u7684\u5f27\u957f\u516c\u5f0f<span class=\"katex math inline\">\u0394P = r \u00b7 \u0394\u03b8<\/span>\uff0c\u5982\u679c<span class=\"katex math inline\">\u0394\u03b8<\/span>\u975e\u5e38\u5c0f\uff0c<span class=\"katex math inline\">\u0394N \u2248 \u0394\u03b8<\/span><\/p>\n<p>\u90a3\u4e48\u5c31\u4e0d\u96be\u5f97\u5230<span class=\"katex math inline\">\\frac{\u0394N}{\u0394P} = \\frac{1}{r}<\/span><\/p>\n<p><img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/pic.imgdb.cn\/item\/67273fa4d29ded1a8c75b16e.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/pic.imgdb.cn\/item\/67273fa4d29ded1a8c75b16e.png\" alt=\"\" \/><\/p><\/noscript>\n<p>\u73b0\u5728\u5269\u4e0b\u7684\u95ee\u9898\u662f\u5982\u4f55\u8ba1\u7b97<span class=\"katex math inline\">\u0394N\u3001\u0394P<\/span>?<\/p>\n<p>\u8fd9\u91cc\u5c31\u9700\u8981\u7528\u5230shader\u4e2d\u7684\u4e00\u4e2a\u51fd\u6570fwidth()\uff0c\u5b83\u53ef\u4ee5\u8ba1\u7b97\u5f53\u524d2x2\u533a\u57df\u4e2d\uff0cpixel\u7684\u7279\u5b9a\u503c\u5728\u6c34\u5e73\u548c\u7ad6\u76f4\u65b9\u5411\u4e0a\u7684\u5dee\u503c\u548c\u3002\u5176\u4e2d\uff0cfwidth()\u53c8\u7531ddx()\u3001ddy()\u8ba1\u7b97\u800c\u6765\uff0c\u56e0\u4e3addx\u51fd\u6570\u662f\u8ba1\u7b97\u6c34\u5e73\u65b9\u5411\u7684\u4e24\u4e2a\u76f8\u90bb\u50cf\u7d20\u7684\u5dee\u503c\uff0cddy\u662f\u8ba1\u7b97\u5782\u76f4\u65b9\u5411\u7684\u4e24\u4e2a\u76f8\u90bb\u50cf\u7d20\u7684\u5dee\u503c\uff0c\u8fd9\u610f\u5473\u7740<strong>\u57282x2\u533a\u57df\u4e2d\uff0c\u76f8\u90bb\u7684pixel\u7684ddx()\u3001ddy\u5f97\u5230\u7684\u7ed3\u679c\u662f\u76f8\u540c\u7684<\/strong>\uff0c\u800c<strong>\u5bf9\u4e8efwidth()\u76f8\u540c\u7684pixel\u5728\u5bf9\u89d2\u7ebf\u4e0a<\/strong><\/p>\n<pre><code class=\"line-numbers\">fwidth(v) = abs(ddx(v))+ abs(ddy(v))\n<\/code><\/pre>\n<p>\u5bf9\u4e8epixel\u7684\u6570\u636e\uff0c\u5982\u8fd9\u91cc\u7684normal\u548cposition\uff0c\u5982\u679c\u60f3\u57fa\u4e8e\u5b83\u4eec\u7684\u53d8\u5316\u6765\u5b9e\u73b0\u7279\u5b9a\u7684\u529f\u80fd\uff0c\u4e0d\u80fd\u4ec5\u4ec5\u91c7\u7528ddx\u6216ddy\uff0c\u56e0\u4e3a\u5b83\u53ea\u4ee3\u8868\u67d0\u4e00\u6570\u636e\u5728x\u6216y\u65b9\u5411\u4e0a\u7684\u53d8\u5316\uff0c\u4e3a\u4e86\u66f4\u52a0\u5168\u9762\u9700\u8981\u7528\u5230fwidth()<\/p>\n<p>\u90a3\u4e48\u8ba1\u7b97<span class=\"katex math inline\">\u0394N\u3001\u0394P<\/span>\u7684\u4ee3\u7801\u5c31\u6bd4\u8f83\u660e\u4e86\u4e86\uff0c\u5927\u81f4\u5b9e\u73b0\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-glsl line-numbers\">float curve = saturate( _CurveFactor * (length(fwidth(normalWS)) \/ length(fwidth(positionWS))) );\nfloat NoL = dot(blurNormalWS, lightDirection);\nfloat3 diffuse = _SSSLUTTex.SampleLevel(Smp_ClampU_ClampV_Linear, float2(NoL * 0.5f + 0.5f, curve), 0);\n<\/code><\/pre>\n<p><span class=\"katex math inline\">\\frac{1}{r}<\/span>\u4e5f\u53ef\u4ee5\u4e0d\u7528\u5b9e\u65f6\u8ba1\u7b97\uff0c\u53ef\u4ee5<strong>\u9884\u5148\u5c06\u6a21\u578b\u8868\u9762\u5404\u70b9\u7684\u66f2\u7387\u70d8\u7119\u5230uv\u8d34\u56fe\u4e0a<\/strong><\/p>\n<\/li>\n<\/ul>\n<h2>Specular<\/h2>\n<p>\u76ae\u80a4\u7684\u9ad8\u5149\u548c\u6f2b\u53cd\u5c04\u5149\u4e0d\u540c\uff0c\u53ea\u6709\u5f88\u5c11\u4e00\u90e8\u5206\u7684\u5149\u5728\u63a5\u89e6\u5230\u76ae\u80a4\u8868\u9762\u540e\u4f1a\u88ab\u955c\u9762\u53cd\u5c04\uff0c\u8fd9\u79cd\u53cd\u5c04\u5149\u5177\u6709\u82e5\u5e72\u6027\u8d28\uff0c\u53ef\u4ee5\u5f52\u7eb3\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\u53cd\u5c04\u5149<strong>\u4e0d\u5e26\u6709\u4efb\u4f55\u989c\u8272\u4fe1\u606f<\/strong>\uff0c\u8fd9\u662f\u7535\u4ecb\u8d28\u4f5c\u4e3a\u53cd\u5c04\u5c42\u7684\u56fa\u6709\u7279\u6027<\/li>\n<li>\u53cd\u5c04\u5149\u4e2d\u7684\u5927\u90e8\u5206\u6765\u81ea\u4e8e\u76ae\u80a4\u6700\u8868\u9762\u7684\u4e00\u5c42\u6cb9\u8102\u5c42(Thin Oily Layer)<\/li>\n<li>\u53cd\u5c04\u5149\u9075\u5faa<strong>Fresnel<\/strong>\u6548\u5e94\uff0c\u63a0\u5c04\u89d2\u5904\u53cd\u5c04\u91cf\u589e\u5927<\/li>\n<\/ul>\n<p>\u9ad8\u5149\u7684\u8d28\u611f\u5728\u4e8e\u9009\u62e9\u5408\u9002\u7684NDF\u3001Geometry\u3001Fresnel\u51fd\u6570\uff0c\u76ae\u80a4\u7684\u6e32\u67d3\u4e5f\u4e0d\u4f8b\u5916\u3002\u8fd9\u91cc\u4e3b\u8981\u8c08\u53caGPU Gem 3\u4e2d\u7684Kelemen\/Szirmay-Kalos BRDF\u6a21\u578b<\/p>\n<p>\u5728PBR\u4e2d\uff0c\u5bf9\u4e8e\u6e32\u67d3\u65b9\u7a0b\u7684\u9ad8\u5149\u9879\uff0c\u4e3b\u8981\u7531\u4e09\u4e2a\u90e8\u5206\u7ec4\u6210\uff0c\u4ee5BRDF\u4e3a\u4f8b\uff1a<\/p>\n<pre><code class=\"line-numbers\">specularLight += lightColor[i] * lightShadow[i] * rho_s * specBRDF( N, V, L[i], eta, m) * saturate( dot( N, L[i] ) );\n<\/code><\/pre>\n<ul>\n<li>lightColor[i] * lightShadow[i]\uff1a\u76f4\u63a5\u5149\u5f3a\u5ea6<\/li>\n<li>rho_s\uff1a\u975e\u7269\u7406\u56e0\u5b50\u7528\u4e8e\u63a7\u5236\u6574\u4f53\u5f3a\u5ea6<\/li>\n<li>specBRDF\uff1a\u7531NDF\u3001Geometry\u3001Fresnel\u4e09\u4e2a\u51fd\u6570\u7ec4\u6210<\/li>\n<li>dot( N, L[i] )\uff1a\u63a7\u5236\u5165\u5c04\u5149\u80fd\u7684\u8870\u51cf\u5f3a\u5ea6<\/li>\n<\/ul>\n<h3>\u6574\u4f53\u516c\u5f0f<\/h3>\n<p>\u516c\u5f0f\u91c7\u7528\u4e00\u79cd\u66f4\u4e3a\u7b80\u7248\u7684Cook-Torrance\u6a21\u578bBRDF<\/p>\n<p><img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/pic.imgdb.cn\/item\/6727a53cd29ded1a8cd9b018.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/pic.imgdb.cn\/item\/6727a53cd29ded1a8cd9b018.png\" alt=\"\" \/><\/p><\/noscript>\n<ul>\n<li>P\u9879\uff1aNDF\u9879<\/li>\n<li>F\u9879\uff1aFresnel\u9879<\/li>\n<li>\u4f59\u4e0b\u90e8\u5206\uff1aGeometry\u9879<\/li>\n<\/ul>\n<h3>Fresnel<\/h3>\n<p>Kelemen\/Szirmay-Kalos BRDF\u6a21\u578b\u4e2d\u7684Fresnel\u51fd\u6570\u4f9d\u65e7\u91c7\u7528Schlick\u83f2\u5c3c\u5c14\u8fd1\u4f3c\uff0c\u5f53\u89c6\u65b9\u5411V\u8d8a\u4e0e\u5fae\u8868\u9762\u6cd5\u7ebfH\u5782\u76f4\u6240\u5f62\u6210\u7684\u53cd\u5c04\u5149\u7167\u5f3a\u5ea6\u8d8a\u9ad8<\/p>\n<pre><code class=\"line-numbers\">float fresnelReflectance( float3 H, float3 V, float F0 ) \n{   \n    float base = 1.0 - dot( V, H );   \n    float exponential = pow( base, 5.0 );   \n    return exponential + F0 * ( 1.0 - exponential ); \n}\n<\/code><\/pre>\n<p>\u5176\u4e2d\uff0cF0\u8868\u793a\u5f53\u76ae\u80a4<strong>\u9047\u5230\u5782\u76f4\u5165\u5c04\u5149\u7167\u65f6\u7684\u53cd\u5c04\u7387<\/strong>\uff0cGPU Gem 3\u4e2d\u7528\u7684\u503c\u4e3a<strong>0.028<\/strong><\/p>\n<h3>Geometry<\/h3>\n<p>\u200b   \u5c06Cook-Torrance\u6a21\u578b\u7684Geometry\u548c<span class=\"katex math inline\">\\frac{1}{4NoLNoV}<\/span>\u8fde\u540c\u4e00\u8d77\u7b80\u5316\u4e3a<span class=\"katex math inline\">\\frac{1}{dot(h,h)}<\/span>\uff0c\u5176\u4e2d<span class=\"katex math inline\">h = v + l<\/span>\uff08<strong>\u672a\u88ab\u5f52\u4e00\u5316\u7684\u534a\u7a0b\u5411\u91cf<\/strong>\uff09<\/p>\n<h3>NDF<\/h3>\n<p>\u5bf9\u4e8eFresnel\u9879\u548cGeometry\u9879\u800c\u8a00\uff0c\u7531\u4e8e\u5b83\u4eec\u9700\u8981\u7528\u5230\u5927\u91cfPS\u9636\u6bb5\u7684\u6570\u636e\uff0c\u56e0\u6b64\u5b83\u4eec\u53ea\u80fd\u653e\u5728PS\u9636\u6bb5\u8fdb\u884c\u8ba1\u7b97\u3002\u4f46NDF\u9879\u5c31\u4e0d\u4e00\u6837\u4e86\uff0c\u5b83\u53ea\u6d89\u53ca\u5230\u4e00\u4e2a\u5fae\u8868\u9762\u6cd5\u7ebfH\uff0c\u53ef\u4ee5\u5bf9NDF\u8fdb\u884c\u9884\u8ba1\u7b97\u4ece\u800c\u51cf\u5c11\u6027\u80fd\u6d88\u8017<\/p>\n<p>\u5728Kelemen\/Szirmay-Kalos\u4e2d\u7684NDF\u9879\u672c\u8d28\u662fBeckmann\uff1a<\/p>\n<p><img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/pic.imgdb.cn\/item\/6727a875d29ded1a8cdc8a5d.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/pic.imgdb.cn\/item\/6727a875d29ded1a8cdc8a5d.png\" alt=\"\" \/><\/p><\/noscript>\n<p>\u5176\u4e2d\uff0c<span class=\"katex math inline\">\u03b1<\/span>\u4e3a<strong>\u5b8f\u89c2\u6cd5\u7ebfN<\/strong>\u548c<strong>\u534a\u7a0b\u5411\u91cfH<\/strong>\u7684\u5939\u89d2\uff1bm\u4e3aroughness<\/p>\n<p>\u9884\u8ba1\u7b97NDF\u7684\u5b9e\u73b0\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"line-numbers\">public enum Quality\n{\n    low = 256,\n    middle = 1024,\n    high = 2048,\n    veryHigh = 4096\n}\npublic Quality quality = Quality.middle;\nprivate int resolution;\npublic RenderTexture NDFLUTRT;\npublic Texture2D NDFLUTTex;\n\nvoid Start()\n{\n    if (NDFLUTRT != null) RenderTexture.ReleaseTemporary(NDFLUTRT);\n    if (NDFLUTTex != null) Texture2D.Destroy(NDFLUTTex);\n    ComputeShader computeShader = Resources.Load&lt;ComputeShader&gt;(\"SSS\/CS_SSSNDFLUT\");\n    if (computeShader == null)\n    {\n        Debug.LogError(\"SSS NDF LUT compute shader is missing\");\n    }\n\n    resolution = (int)quality;\n\n    NDFLUTRT = RenderTexture.GetTemporary(resolution, resolution, 0, RenderTextureFormat.RFloat, RenderTextureReadWrite.Linear);\n    NDFLUTRT.enableRandomWrite = true;\n    NDFLUTTex = new Texture2D(resolution, resolution, TextureFormat.RFloat, true, true);\n\n    var kernelIndex = computeShader.FindKernel(\"SSSNDFLUT\");\n    computeShader.SetTexture(kernelIndex, \"_RW_OutputTex\", NDFLUTRT);\n    computeShader.SetVector(\"_NDFLUTSize\", new Vector4(resolution, resolution, 1f \/ resolution, 1f \/ resolution));\n    computeShader.Dispatch(kernelIndex, resolution \/ 8, resolution \/ 8, 1);\n\n    RenderTexture.active = NDFLUTRT;\n    NDFLUTTex.ReadPixels(new Rect(0, 0, resolution, resolution), 0, 0);\n    RenderTexture.active = null;\n\n    System.IO.File.WriteAllBytes(\"Assets\/Resources\/SSS\/SSSNDFLut.jpg\", NDFLUTTex.EncodeToJPG());\n}\n\nprivate void OnDestroy()\n{\n    RenderTexture.ReleaseTemporary(NDFLUTRT);\n    Texture2D.Destroy(NDFLUTTex);\n}\n<\/code><\/pre>\n<pre><code class=\"line-numbers\">#pragma kernel SSSNDFLUT\n\nRWTexture2D&lt;float4&gt; _RW_OutputTex;\n\nfloat4 _NDFLUTSize;\n\nfloat PHBeckmann( float NoH, float m ) \n{   \n    float alpha = acos( NoH );\n    float ta = tan( alpha );\n    float val = 1.0 \/ (pow2(m) * pow4(NoH)) * exp(-(ta*ta) \/ pow2(m));   \n    return val; \n} \n\nfloat GetNDFLUT(float2 uv)\n{\n    float NoH = uv.x;\n    float roughness = uv.y;\n\n    \/\/ Scale the value to fit within [0,1] \u2013 invert upon lookup. \n    return 0.5 * pow( PHBeckmann( NoH, roughness ), 0.1 ); \n}\n\n[numthreads(8,8,1)]\nvoid SSSNDFLUT (uint3 id : SV_DispatchThreadID)\n{\n    float2 uv = ((float2)id.xy + 0.5f) \/ _NDFLUTSize;\n    _RW_OutputTex[id.xy] = GetNDFLUT(uv);\n}\n<\/code><\/pre>\n<p>\u6700\u7ec8\u53ef\u4ee5\u5f97\u5230\u5982\u4e0b\u7ed3\u679c\uff1a<\/p>\n<p><img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/pic.imgdb.cn\/item\/6727b244d29ded1a8ce3cbc8.jpg\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/pic.imgdb.cn\/item\/6727b244d29ded1a8ce3cbc8.jpg\" alt=\"\" \/><\/p><\/noscript>\n<p>\u5176\u4e2d\uff0c\u6a2a\u5750\u6807\u4ee3\u8868NoH\uff0c\u7eb5\u5750\u6807\u4ee3\u8868roughness<\/p>\n<h3>\u5982\u4f55\u4f7f\u7528<\/h3>\n<p>\u7167\u7740\u4e00\u5f00\u59cb\u63d0\u5230\u7684\u516c\u5f0f\uff0c\u5f80\u91cc\u5957\u5373\u53ef<\/p>\n<pre><code class=\"language-glsl line-numbers\">float3 halfVectorUnNor = light.direction + (GetCameraPositionWS() - posWS);\nfloat NoH = dot(lightData.normalWS, halfVectorUnNor);\n\nfloat NDF = pow(2.f * _SSSNDFLutTex.SampleLevel(Smp_ClampU_ClampV_Linear, float2(NoH, brdfData.roughness), 0), 10);\nfloat F = SchlickFresnel(brdfData.HoV, brdfData.F0);\nfloat G = dot(halfVectorUnNor, halfVectorUnNor);\nfloat3 specular = max(NDF * F * rcp(G), FLT_EPS);\n\nresult += specular * brdfData.NoL * _SubsurfaceSpecularIntensity;\n<\/code><\/pre>\n<h1>\u6700\u7ec8\u6548\u679c<\/h1>\n<p>Diffuse\uff0c\u6548\u679c\u5982\u4e0b\uff1a<br \/>\n<img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/a1.boltp.com\/2024\/11\/05\/672a2f2cdece0.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"1730817827327.png\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/a1.boltp.com\/2024\/11\/05\/672a2f2cdece0.png\" alt=\"1730817827327.png\" \/><\/p><\/noscript>\n<p>Specular\u6548\u679c\u5982\u4e0b\uff1a<br \/>\n<img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/a1.boltp.com\/2024\/11\/05\/672a2f8bcac24.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"1730817923363.png\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/a1.boltp.com\/2024\/11\/05\/672a2f8bcac24.png\" alt=\"1730817923363.png\" \/><\/p><\/noscript>\n<p>\u5408\u5e76\u5e76\u5e26\u6709GI\u6548\u679c\u5982\u4e0b\uff1a<br \/>\n<img decoding=\"async\"   class=\"lazyload\" data-src=\"https:\/\/a1.boltp.com\/2024\/11\/05\/672a2fc8f1ca7.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"1730817983787.png\" \/><\/p >\n<noscript><img decoding=\"async\" src=\"https:\/\/a1.boltp.com\/2024\/11\/05\/672a2fc8f1ca7.png\" alt=\"1730817983787.png\" \/><\/p><\/noscript>\n<h1>\u603b\u7ed3<\/h1>\n<p>\u9884\u79ef\u5206\u6b21\u8868\u9762\u6563\u5c04\u662f\u4e2a\u975e\u5e38\u9ad8\u6548\u7684\u7b97\u6cd5\uff0c\u5b83\u901a\u8fc7\u5c06\u6f2b\u53cd\u5c04\u90e8\u5206\u4e0e\u9ad8\u5149\u90e8\u5206\u7684NDF\u9879\u63d0\u524d\u9884\u8ba1\u7b97\u5b58\u5728\u4e24\u5f20\u56fe\uff0c\u5728\u5149\u7167\u8ba1\u7b97\u65f6\u901a\u8fc7\u8ba1\u7b97\u66f2\u7387\u3001NoL\u3001roughness\u3001NoH\u6765\u91c7\u6837\u8fd9\u4e24\u5f20\u56fe\uff0c\u771f\u6b63\u7684\u5f00\u9500\u5728\u9ad8\u5149\u90e8\u5206\u7684G\u9879\u3001F\u9879\uff0c\u6548\u7387\u975e\u5e38\u4e0d\u9519<\/p>\n<p>\u4f46\u8fd9\u79cd\u9884\u79ef\u5206\u7684\u65b9\u5f0f\u4e5f\u5b58\u5728\u4e9b\u8bb8\u95ee\u9898\uff1a<\/p>\n<ul>\n<li><strong>\u5bf9\u4e8e\u5e73\u5766\u7684\u8868\u9762\uff0c\u6548\u679c\u4e0d\u597d<\/strong>\n<p>\u91cd\u65b0\u56de\u987e\u9884\u79ef\u5206\u7684\u6f2b\u53cd\u5c04\u56fe\uff0c\u4e0d\u96be\u53d1\u73b0\u5f53\u66f2\u7387\u8d8a\u6765\u8d8a\u4f4e\uff0c\u6f2b\u53cd\u5c04\u7684\u6563\u5c04\u6548\u679c\u8d8a\u6765\u8d8a\u6de1\uff0c\u5230\u6700\u540e\u4e00\u70b9\u4e5f\u6ca1\u6709\uff0c\u9000\u5316\u5230\u4e86BRDF\u7684\u6f2b\u53cd\u5c04\u6548\u679c<\/p>\n<ul>\n<li>\u5982\u4f55\u89e3\u51b3\uff1a\u6709\u51e0\u79cd\u601d\u8def\uff0c\u90fd\u662f\u901a\u8fc7hack<\/li>\n<li>\u5b8f\u89c2normal\u5982\u679c\u7279\u522b\u4e0d\u660e\u663e\uff0c\u53ef\u4ee5\u7528\u5fae\u89c2normal<\/li>\n<li>\u7528\u539a\u5ea6\u56fe\u914d\u5408\u66f2\u7387\uff0c\u5f53\u66f2\u7387\u51e0\u4e4e\u4e3a0\uff0c\u4f46\u539a\u5ea6\u56fe\u53d1\u73b0\u8fd9\u91cc\u7279\u522b\u8584\u65f6\uff0cbias\u4e00\u4e2a\u66f2\u7387<\/li>\n<li>\u8bbe\u7f6e\u66f2\u7387\u9608\u503c\uff1a\u5f53\u66f2\u7387\u5c0f\u4e8e\u67d0\u4e2a\u503c\u65f6\uff0c\u5f3a\u5236clamp<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u4e0d\u652f\u6301\u900f\u5c04<\/strong>\n<p>\u7531\u4e8e\u6f2b\u53cd\u5c04\u7684\u7269\u7406\u6a21\u578b\u662f\u5bc6\u5207\u5706\uff0c\u5b83<strong>\u5047\u8bbe\u5706\u7684\u534a\u5f84\u662f\u975e\u5e38\u5927\u7684<\/strong>\uff0c\u5bfc\u81f4\u5149\u7ebf\u6839\u672c\u6ca1\u6709\u8db3\u591f\u80fd\u91cf\u8d70\u5230\u80cc\u9762\u5c04\u51fa<\/p>\n<ul>\n<li>\u5982\u4f55\u89e3\u51b3\uff1a\u5f15\u5165\u539a\u5ea6\u56fe\uff0c\u4f7f\u7528\u5bd2\u971c\u5f15\u64ce\u5206\u4eab\u5feb\u901f\u6b21\u8868\u9762\u6563\u5c04\uff0c\u5f25\u8865\u900f\u5c04\u6548\u679c<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u6563\u5c04\u662f\u4f4e\u9891\u4fe1\u53f7\uff0c\u4f1a\u62b9\u6389\u9ad8\u9891\u7684normal<\/strong>\n<p>\u7531\u4e8e\u6563\u5c04\u662f\u4ece\u5404\u4e2a\u65b9\u5411\u5c04\u51fa\u7684\uff0c\u5728\u7a7a\u95f4\u4e92\u76f8\u53e0\u52a0\u3001\u6df7\u5408\uff0c\u5c5e\u4e8e\u4f4e\u9891\u4fe1\u606f\uff1b\u7531\u4e8e\u9884\u79ef\u5206\u6f2b\u53cd\u5c04\u4f1a\u7528\u5230normal\uff0c\u82e5\u78b0\u5230\u4e00\u4e9b\u7ec6\u8282\u7684\u9ad8\u9891normal\uff0c\u4f1a\u628anormal\u7684\u9ad8\u9891\u4fe1\u606f\u6a21\u7cca\u6389<\/p>\n<ul>\n<li>\u5982\u4f55\u89e3\u51b3\uff1a\u5206\u6210\u4e24\u5957normal\uff0c\u4e00\u5957\u9ad8\u9891\u3001\u4e00\u5957\u4f4e\u9891\uff0c\u4f4e\u9891\u7684\u4e13\u95e8\u8ba1\u7b97\u6f2b\u53cd\u5c04\uff0c\u9ad8\u9891\u8ba1\u7b97\u9ad8\u5149<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u4e0d\u597d\u5904\u7406shadow<\/strong>\n<p>\u7531\u4e8eSSS\u8ba1\u7b97\u7684\u662f\u76f4\u63a5\u5149\u7167\uff0c\u90a3\u4e48\u5f88\u81ea\u7136\u7684\uff0c\u9634\u5f71\u4e0e\u975e\u9634\u5f71\u4ea4\u754c\u5904\u7684\u6563\u5c04\u8fc7\u5ea6\u6548\u679c\u5e76\u4e0d\u597d<\/p>\n<ul>\n<li>\u5982\u4f55\u89e3\u51b3\uff1a\u66f4\u6539shadow\u8ba1\u7b97\u903b\u8f91\uff0c\u4e0d\u518d\u8fd4\u56de01\uff0c\u800c\u662f\u4e00\u4e2a\u7f8e\u672f\u63a7\u5236\u7684\u6b21\u8868\u9762\u6563\u5c04\u989c\u8272\u52301\u7684\u6df7\u5408<\/li>\n<\/ul>\n<pre><code class=\"language-glsl line-numbers\">lerp(SubsurfaceRedColor, 1.f, shadowVisibility);\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h1>Reference<\/h1>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.cnblogs.com\/timlly\/p\/11098212.html\" target=\"_blank\"  rel=\"nofollow\" >\u5256\u6790Unreal Engine\u8d85\u771f\u5b9e\u4eba\u7c7b\u7684\u6e32\u67d3\u6280\u672fPart 1 - \u6982\u8ff0\u548c\u76ae\u80a4\u6e32\u67d3<\/a><\/p>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.jianshu.com\/p\/ab20efe47dc0\" target=\"_blank\"  rel=\"nofollow\" >\u7b80\u8c08\u5b9e\u65f6\u76ae\u80a4\u6e32\u67d3\u4e4b\u9884\u79ef\u5206SSS<\/a><\/p>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/zhuanlan.zhihu.com\/p\/72161323\" target=\"_blank\"  rel=\"nofollow\" >\u9884\u79ef\u5206\u76ae\u80a4\u6e32\u67d3LUT\u751f\u6210\u5b9e\u8df5<\/a><\/p>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/tyson-wu.github.io\/blogs\/2021\/07\/08\/Ronja_Partial_Derivatives\/\" target=\"_blank\"  rel=\"nofollow\" >Partial Derivatives (fwidth)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ec0\u4e48\u662f\u6b21\u8868\u9762\u6563\u5c04\uff1f \u5728\u6700\u4e3a\u5e38\u89c1\u7684BRDF\u4e2d\uff0c\u63cf\u8ff0\u4e86\u5149\u7ebf\u6253\u5230\u7269\u4f53\u8868\u9762\uff0c\u5982\u4f55\u53cd\u5c04\uff1b\u4f46\u9488\u5bf9\u4e0d\u540c\u7269\u4f53\uff0c\u5149\u7ebf\u5e76\u975e\u5168\u90e8\u90fd\u53cd\u5c04\u6216\u88ab\u5438\u6536\u3002\u5b58\u5728\u4e00\u4e9b &#8230;<\/p>","protected":false},"author":1,"featured_media":278,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/chenglixue.top\/index.php?rest_route=\/wp\/v2\/posts\/272"}],"collection":[{"href":"http:\/\/chenglixue.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/chenglixue.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/chenglixue.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/chenglixue.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=272"}],"version-history":[{"count":18,"href":"http:\/\/chenglixue.top\/index.php?rest_route=\/wp\/v2\/posts\/272\/revisions"}],"predecessor-version":[{"id":422,"href":"http:\/\/chenglixue.top\/index.php?rest_route=\/wp\/v2\/posts\/272\/revisions\/422"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/chenglixue.top\/index.php?rest_route=\/wp\/v2\/media\/278"}],"wp:attachment":[{"href":"http:\/\/chenglixue.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/chenglixue.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=272"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/chenglixue.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}