{"id":3453,"date":"2021-09-19T22:46:51","date_gmt":"2021-09-19T14:46:51","guid":{"rendered":"https:\/\/www.yumefx.com\/?p=3453"},"modified":"2022-03-30T11:03:19","modified_gmt":"2022-03-30T03:03:19","slug":"%e9%80%8f%e6%98%8e%e9%80%9a%e9%81%93%e9%a2%84%e4%b9%98%e6%a8%a1%e5%bc%8f%ef%bc%88premult-unpremult%ef%bc%89%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.yumefx.com\/?p=3453","title":{"rendered":"\u900f\u660e\u901a\u9053\u9884\u4e58\u6a21\u5f0f\uff08Premult &#038; Unpremult\uff09\u8be6\u89e3"},"content":{"rendered":"\n<h1 style=\"text-align: center;\">\u524d\u8a00<\/h1>\n<p>\u5728\u524d\u6587<a href=\"https:\/\/www.yumefx.com\/?p=3437\">\u900f\u660e\u8d34\u56fe\u5b9e\u73b0<\/a>\u4e2d\u7684AB\u900f\u6df7\u548cAD\u900f\u53e0\u5b9e\u73b0\u4ee3\u7801\u4e2d\uff0c\u6709\u63d0\u5230\u9884\u4e58\u8fd9\u4e2a\u540d\u8bcd\uff0c\u6839\u636e\u8d34\u56fe\u662f\u5426\u9884\u4e58Alpha\uff0c\u4ee3\u7801\u7684\u6df7\u5408\u6a21\u5f0f\u9700\u8981\u8bbe\u7f6e\u4e0d\u540c\u7684\u53c2\u6570\uff0c\u81ea\u5b9a\u4e49\u6df7\u5408\u6a21\u5f0f\u4e2d\u8ba1\u7b97RGB\u901a\u9053\u7684\u65b9\u5f0f\u4e5f\u4f1a\u4e0d\u540c\uff0c\u56e0\u6b64\u8fd9\u7bc7\u6587\u7ae0\u5c31\u8be6\u7ec6\u4ecb\u7ecd\u4e00\u4e0b\u9884\u4e58\u6a21\u5f0f\u8fd9\u4e2a\u6982\u5ff5\u3002<\/p>\n<h1>\u00a0<\/h1>\n<h1 style=\"text-align: center;\">\u9884\u4e58\u6a21\u5f0f\u662f\u4ec0\u4e48<\/h1>\n<p>\u5728\u4e09\u7ef4\u8f6f\u4ef6\u7684\u6e32\u67d3\u8bbe\u7f6e\u4e2d\uff0c\u51fa\u56fe\u683c\u5f0f\u5982\u679c\u9009\u62e9tga\u3001tif\u7b49\u5e26\u6709\u900f\u660e\u901a\u9053\uff08Alpha\uff09\u7684\u56fe\u7247\u65f6\uff0c\u56fe\u7247\u683c\u5f0f\u8bbe\u7f6e\u4e2d\u5f80\u5f80\u4f1a\u6709\u4e00\u4e2a\u5173\u4e8e<code>premult<\/code>\u7684\u590d\u9009\u6846\uff0c\u4f8b\u5982Maya\u4e2d\u7684Arnold\u8f93\u51fatif\u683c\u5f0f\u65f6\u662f\u8fd9\u6837\u7684\u3002<\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-3454 aligncenter\" src=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_08.jpg\" alt=\"\" width=\"462\" height=\"706\" srcset=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_08.jpg 462w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_08-196x300.jpg 196w\" sizes=\"(max-width: 462px) 100vw, 462px\" \/><\/p>\n<p>\u53ef\u4ee5\u770b\u5230\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f\u672a\u52fe\u9009\u72b6\u6001\uff0c\u4e5f\u5c31\u662fPremult\uff08\u9884\u4e58\uff09\u6a21\u5f0f\uff1b\u5982\u679c\u52fe\u9009\u4e0a\u5c31\u662fUnpremult\uff08\u975e\u9884\u4e58\uff09\u6a21\u5f0f\uff0c\u6709\u4e9b\u8f6f\u4ef6\u91cc\u4f1a\u79f0\u4e3aStraight\uff08\u76f4\u901a\uff09\u6a21\u5f0f\uff0c\u4ee5\u4e0b\u4e3a\u907f\u514d\u6df7\u6dc6\uff0c\u5c31\u79f0\u4e3aStraight\uff08\u76f4\u901a\uff09\u6a21\u5f0f\u3002<\/p>\n<p>\u4e24\u79cd\u7c7b\u578b\u7684\u533a\u522b\u5728\u4e8eRGB\u901a\u9053\u7684\u5185\u5bb9\uff0c\u76f4\u901aAlpha\u56fe\u7247\u7684RGB\u901a\u9053\u4fdd\u5b58\u7740\u6700\u539f\u672c\u7684RGB\u6570\u503c\uff08\u900f\u660e\u4fe1\u606f\u4ec5\u5b58\u5728\u4e8eAlpha\u901a\u9053\u4e2d\uff0c\u5728\u663e\u793a\u56fe\u7247\u65f6RGB\u901a\u9053\u9700\u8981\u4e58\u4ee5Alpha\u901a\u9053\u624d\u80fd\u5f97\u5230\u6b63\u786e\u7684\u6548\u679c\uff09\uff1b\u800c\u9884\u4e58Alpha\u56fe\u7247\u7684RGB\u901a\u9053\u4fdd\u5b58\u7684\u5219\u662f\u539f\u672c\u7684RGB\u901a\u9053\u4e58\u4ee5Alpha\u901a\u9053\u7684\u7ed3\u679c\uff08\u900f\u660e\u4fe1\u606f\u65e2\u5b58\u5728\u4e8eAlpha\u901a\u9053\u4e2d\uff0c\u4e5f\u4e58\u8fdb\u4e86RGB\u901a\u9053\u4e2d\uff0c\u5728\u663e\u793a\u56fe\u7247\u65f6\u53ea\u5c55\u793aRGB\u901a\u9053\u4fe1\u606f\u5373\u53ef\uff09\u3002<\/p>\n<p>\u4e00\u53e5\u8bdd\u6765\u8bf4\uff0c\u9884\u4e58=\u9884\u5148\u4e58\u4ee5\uff0c\u539f\u59cbRGB\u4fe1\u606f\u9884\u5148\u4e58\u4ee5Alpha\u4fdd\u5b58\u8fdbRGB\u901a\u9053\uff1b\u76f4\u901a=\u76f4\u5b58\u901a\u9053\uff0c\u76f4\u63a5\u5c06\u539f\u59cbRGB\u4fe1\u606f\u4fdd\u5b58\u8fdbRGB\u901a\u9053\u3002<\/p>\n<h1>\u00a0<\/h1>\n<h1 style=\"text-align: center;\">\u900f\u660e\u901a\u9053\u539f\u7406<\/h1>\n<p>\u5bf9\u4e8e\u4e00\u4e2a\u534a\u900f\u660e\u7684\u7ea2\u8272\u56fe\u7247\uff0c\u4f7f\u7528\u5e38\u89c1\u76848\u4f4dRGBA\uff08\u53d6\u503c\u8303\u56f4\u4e3a[0~255\uff0c0~255\uff0c0~255\uff0c0~1]\uff09\u65b9\u5f0f\u5b58\u50a8\uff0c\u5219\u76f4\u901aAlpha\u6a21\u5f0f\u5b58\u50a8\u4e3a[255, 0, 0, 0.5]\uff0c\u9884\u4e58Alpha\u6a21\u5f0f\u5b58\u50a8\u4e3a[128, 0, 0, 0.5]\u3002<\/p>\n<p>\u76f4\u901aAlpha\u8f6c\u9884\u4e58Alpha\u7684\u65b9\u5f0f\u662fRGB\u901a\u9053\u5206\u522b\u4e58\u4ee5Alpha\uff0c\u53cd\u8fc7\u6765\u9884\u4e58Alpha\u8f6c\u76f4\u901aAlpha\u7684\u65b9\u5f0f\u5219\u662fRGB\u901a\u9053\u5206\u522b\u9664\u4ee5Alpha\u3002<\/p>\n<p>\u4f46\u5bf9\u4e8e8\u4f4d\u6df1\u5ea6\u7684\u56fe\u7247\uff0c\u4e58\u9664Alpha\u90fd\u4f1a\u9020\u6210\u56fe\u7247\u7cbe\u5ea6\u635f\u5931\uff0c\u60f3\u8981\u65e0\u635f\u8f6c\u6362\u9884\u4e58Alpha\u548c\u76f4\u901aAlpha\uff0c\u6700\u597d\u4f7f\u752816\u4f4d\u6216\u800532\u4f4d\u6df1\u5ea6\u56fe\u7247\u3002<\/p>\n<p>\u90a3\u4e48\u5982\u4f55\u5728\u5c4f\u5e55\u4e0a\u663e\u793a\u900f\u660e\u6548\u679c\u5462\uff0c\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u662f\u7ed9\u56fe\u7247\u4e00\u4e2a\u9ed8\u8ba4\u7684\u80cc\u666f\u8272\uff0c\u900f\u660e\u533a\u57df\u76f4\u63a5\u663e\u793a\u80cc\u666f\u8272\u5373\u53ef\u3002<\/p>\n<p>\u00a0<\/p>\n<h3>\u76f4\u901aAlpha\u7684\u663e\u793a\u539f\u7406<\/h3>\n<p>\u5c06\u4e00\u4e2a\u76f4\u901aAlpha\u6a21\u5f0f\u7684\u900f\u660e\u5ea6\u4e3aA\u7684\u989c\u8272C\u663e\u793a\u5728\u80cc\u666f\u8272B\u7684\u4e0a\u9762\uff0c\u8ba1\u7b97\u6700\u7ec8\u6df7\u5408\u989c\u8272F\u516c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>F=C.rgb * A + B.rgb * (1 \u2212 A)<\/p>\n<p>\u4f8b\u5982\u900f\u660e\u5ea6\u4e3a0.6\u7684\u7ea2\u8272\u56fe\u7247\u663e\u793a\u5728\u767d\u8272\u80cc\u666f\u4e0a\u662f\u8fd9\u6837\u7684<\/p>\n<p>[255, 0, 0] * 0.6 + [255, 255, 255] * (1 &#8211; 0.6) = [255, 102, 102]<\/p>\n<p>\u8fd9\u610f\u5473\u7740[255, 0, 0, 0.6]\u548c[255, 102, 102, 1.0]\u5728\u767d\u8272\u80cc\u666f\u4e0a\u7684\u663e\u793a\u6548\u679c\u662f\u76f8\u540c\u7684\u3002<\/p>\n<p>\u800c\u5728\u9ed1\u8272\u80cc\u666f\u4e0a\u5219\u662f\u8fd9\u6837\u7684<\/p>\n<p>[255, 0, 0] * 0.6 + [0, 0, 0] * (1 &#8211; 0.6) = [153, 0, 0]<\/p>\n<p>\u540c\u6837\u8fd9\u610f\u5473\u7740[255, 0, 0, 0.6]\u548c[153, 0, 0, 1.0]\u5728\u9ed1\u8272\u80cc\u666f\u4e0a\u7684\u663e\u793a\u6548\u679c\u662f\u76f8\u540c\u7684\u3002<\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-3488 aligncenter\" src=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/PremulAlpha_02.gif\" alt=\"\" width=\"1506\" height=\"803\" \/><\/p>\n<h3>\u00a0<\/h3>\n<h3>\u9884\u4e58Alpha\u7684\u663e\u793a\u539f\u7406<\/h3>\n<p>\u90a3\u4e48\u518d\u6765\u770b\u4e00\u4e0b\u9884\u4e58Alpha\u6a21\u5f0f\u7684\u900f\u660e\u5ea6\u4e3aA\u7684\u989c\u8272C\u663e\u793a\u5728\u80cc\u666f\u8272B\u7684\u4e0a\u9762\uff0c\u8ba1\u7b97\u6700\u7ec8\u6df7\u5408\u989c\u8272F\u516c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>F=C.rgb + B.rgb * (1 \u2212 A)<\/p>\n<p>\u663e\u7136\u56e0\u4e3a\u5df2\u7ecf\u505a\u8fc7\u9884\u4e58\uff0c\u6240\u4ee5RGB\u901a\u9053\u4e0d\u9700\u8981\u518d\u4e58\u4ee5Alpha\u4e86\uff0c\u8ba1\u7b97\u91cf\u4f1a\u5c11\u4e00\u4e9b\u3002<\/p>\n<p>\u6b64\u65f6\u900f\u660e\u5ea6\u4e3a0.6\u7684\u7ea2\u8272\u56fe\u7247\u663e\u793a\u5728\u767d\u8272\u80cc\u666f\u4e0a\u662f\u8fd9\u6837\u7684<\/p>\n<p>[153, 0, 0] + [255, 255, 255] * (1 &#8211; 0.6) = [255, 102, 102]<\/p>\n<p>\u4e5f\u5c31\u662f\u56fe\u7247\u4e2d\u6240\u5b58\u7684\u989c\u8272\u662f\u88abAlpha\u5904\u7406\u8fc7\u7684\u989c\u8272[153, 0, 0, 0.6]\u548c[255, 102, 102, 1.0]\u5728\u767d\u8272\u80cc\u666f\u4e0a\u7684\u663e\u793a\u6548\u679c\u662f\u76f8\u540c\u7684\u3002<\/p>\n<p>\u800c\u5728\u9ed1\u8272\u80cc\u666f\u4e0a\u662f\u8fd9\u6837\u7684<\/p>\n<p>[153, 0, 0] + [0, 0, 0] * (1 &#8211; 0.6) = [153, 0, 0]<\/p>\n<p>\u4e5f\u5c31\u662f\u56fe\u7247\u4e2d\u6240\u5b58\u7684\u989c\u8272\u662f\u88abAlpha\u5904\u7406\u8fc7\u7684\u989c\u8272[153, 0, 0, 0.6]\u548c[153, 0, 0, 1.0]\u5728\u9ed1\u8272\u80cc\u666f\u4e0a\u7684\u663e\u793a\u6548\u679c\u662f\u76f8\u540c\u7684\u3002\u6362\u53e5\u8bdd\u8bf4\u5728\u9ed1\u8272\u80cc\u666f\u4e0a\u663e\u793a\u9884\u4e58Alpha\u56fe\u7247\u65f6\u65e0\u9700\u8ba1\u7b97\uff0c\u76f4\u63a5\u663e\u793aRGB\u901a\u9053\u5373\u53ef\u3002<\/p>\n<h1>\u00a0<\/h1>\n<h1 style=\"text-align: center;\">\u9884\u4e58\u6a21\u5f0f\u8f6c\u6362<\/h1>\n<p>\u8fd8\u662f\u4ee5Maya\u4e3a\u4f8b\uff0c\u5728\u52fe\u9009\u4e0e\u672a\u52fe\u9009Unpremult Alpha\u4e0b\uff0c\u6e32\u67d3\u7a97\u53e3\u7684\u6548\u679c\u662f\u4e00\u81f4\u7684\u3002<\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-3455 aligncenter\" src=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_09.jpg\" alt=\"\" width=\"915\" height=\"545\" srcset=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_09.jpg 915w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_09-300x179.jpg 300w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_09-768x457.jpg 768w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/p>\n<p>Alpha\u901a\u9053\u5185\u5bb9\u4e5f\u4e00\u6837\u3002<\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-3456 aligncenter\" src=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_10.jpg\" alt=\"\" width=\"907\" height=\"539\" srcset=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_10.jpg 907w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_10-300x178.jpg 300w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_10-768x456.jpg 768w\" sizes=\"(max-width: 907px) 100vw, 907px\" \/><\/p>\n<p>\u800c\u8f93\u51fa\u7684\u56fe\u7247\u5219\u4e0d\u540c\uff0c\u76f4\u901aAlpha\u7684\u56fe\u7247\u5728Nuke\u4e2d\u6253\u5f00\u6548\u679c\u662f\u8fd9\u6837\u7684\u3002<\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-3458 aligncenter\" src=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_04.jpg\" alt=\"\" width=\"956\" height=\"535\" srcset=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_04.jpg 956w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_04-300x168.jpg 300w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_04-768x430.jpg 768w\" sizes=\"(max-width: 956px) 100vw, 956px\" \/><\/p>\n<p>\u9884\u4e58\u7684\u56fe\u7247\u5728Nuke\u4e2d\u6253\u5f00\u5219\u662f\u8fd9\u6837\uff1a<\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-3459 aligncenter\" src=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_05.jpg\" alt=\"\" width=\"959\" height=\"537\" srcset=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_05.jpg 959w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_05-300x168.jpg 300w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_05-768x430.jpg 768w\" sizes=\"(max-width: 959px) 100vw, 959px\" \/><\/p>\n<p>\u53ef\u4ee5\u770b\u51fa\u9884\u4e58Alpha\u7684\u56fe\u7247\u548cMaya\u4e2d\u6548\u679c\u4e00\u81f4\uff0c\u800c\u76f4\u901aAlpha\u7684\u56fe\u7247\u7684\u73bb\u7483\u7403\u4f53\u90e8\u5206\u5219\u662f\u5b8c\u5168\u4e0d\u900f\u660e\uff0c\u5e26\u6709\u5b8c\u6574\u7684\u80cc\u666f\u4fe1\u606f\uff08\u539f\u59cb\u7684RGB\u4fe1\u606f\uff09\u3002<\/p>\n<p>\u8fd9\u662f\u56e0\u4e3aNuke\u5728\u4f7f\u7528Read\u8282\u70b9\u8bfb\u53d6\u56fe\u7247\u65f6\uff0c\u9ed8\u8ba4\u6240\u6709\u56fe\u7247\u662f\u9884\u4e58Alpha\u6a21\u5f0f\uff0c\u90a3\u4e48\u5982\u679c\u8981\u8bfb\u53d6\u7684\u56fe\u7247\u662f\u76f4\u901aAlpha\u6a21\u5f0f\u65f6\u5e94\u8be5\u600e\u4e48\u529e\u5462\uff1f<\/p>\n<p>\u5f88\u7b80\u5355\uff0c\u65e2\u7136\u6ca1\u6709\u9884\u4e58Alpha\uff0c\u90a3\u5c31\u66ff\u4ed6\u4e58Alpha\u3002<\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-3461 aligncenter\" src=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_06.gif\" alt=\"\" width=\"1619\" height=\"976\" \/><\/p>\n<p>\u5148\u901a\u8fc7shuffle\u8282\u70b9\u53d6\u51fa\u56fe\u7247\u7684Alpha\u901a\u9053\uff0c\u518d\u4e58\u4ee5\u76f4\u901aAlpha\u56fe\u7247\uff08merge\u8282\u70b9\u7684multiply\uff09\uff0c\u5f97\u5230\u7684\u5c31\u662f\u9884\u4e58Alpha\u6548\u679c\uff0c\u4e0e\u539f\u59cb\u9884\u4e58Alpha\u7684\u7d20\u6750\u6548\u679c\u4e00\u81f4\u3002<\/p>\n<p>\u800c\u5728\u504f\u5411\u5e73\u9762\u8bbe\u8ba1\u7c7b\u7684\u8f6f\u4ef6\u4e2d\u4f8b\u5982Photoshop\u3001AfterEffects\u4ee5\u53ca\u7edd\u5927\u591a\u6570\u7684\u56fe\u7247\u67e5\u770b\u5de5\u5177\uff0c\u90fd\u9ed8\u8ba4\u6240\u6709\u56fe\u7247\u4e3a\u76f4\u901a\u6a21\u5f0f\uff0c\u5728\u663e\u793a\u56fe\u7247\u7684\u65f6\u5019\u4f1a\u5c06RGB\u901a\u9053\u4e58\u4ee5Alpha\u518d\u8fdb\u884c\u663e\u793a\uff0c\u800c\u9884\u4e58\u7684\u56fe\u7247\u672c\u8eab\u5df2\u7ecf\u4e58\u8fc7\u4e00\u6b21\uff0c\u8fd9\u6837\u4e00\u6765\u5c31\u4f1a\u5bfc\u81f4\u9884\u4e58\u7684\u56fe\u7247\u4e58\u4e86\u4e24\u6b21Alpha\uff0c\u672c\u6765\u534a\u900f\u660e\u7684\u533a\u57df\u4f1a\u66f4\u52a0\u900f\u660e\uff0c\u5bfc\u81f4\u4e22\u5931\u900f\u660e\u533a\u57df\u7ec6\u8282\u3001\u7269\u4f53\u8fb9\u7f18\u51fa\u73b0\u9ed1\u8fb9\u7b49\u7b49\u95ee\u9898\u3002<\/p>\n<p>\u5f53\u7136\u5728\u8fd9\u4e9b\u8f6f\u4ef6\u4e2d\u4e5f\u662f\u6709\u529e\u6cd5\u5904\u7406\u9884\u4e58\u56fe\u7247\u7684\uff0c\u4f8b\u5982\u5728AfterEffects\u91cc\u9762\u5c31\u53ef\u4ee5\u901a\u8fc7\u89e3\u91ca\u7d20\u6750\u7684\u65b9\u5f0f\u8bbe\u7f6e\u56fe\u7247\u9884\u4e58\u683c\u5f0f\u3002<\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-3479 aligncenter\" src=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_01.jpg\" alt=\"\" width=\"1233\" height=\"867\" srcset=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_01.jpg 1233w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_01-300x211.jpg 300w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_01-1024x720.jpg 1024w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/AlphaPremul_01-768x540.jpg 768w\" sizes=\"(max-width: 1233px) 100vw, 1233px\" \/><\/p>\n<p>\u53ea\u4e0d\u8fc7\uff0c\u4e13\u4e1a\u7684\u4e8b\u60c5\u8fd8\u662f\u5f97\u4e13\u4e1a\u7684\u6765\u6bd4\u8f83\u597d\uff0c\u5bf9\u5427Nuke\u8001\u5f1f\u3002<\/p>\n<h1>\u00a0<\/h1>\n<h1 style=\"text-align: center;\">\u900f\u660e\u8d34\u56fe\u7b97\u6cd5\u4e2d\u7684\u4f7f\u7528<\/h1>\n<p>\u73b0\u5728\uff0c\u56de\u8fc7\u5934\u6765\u770b\u524d\u6587<a href=\"https:\/\/www.yumefx.com\/?p=3437\">\u900f\u660e\u8d34\u56fe\u5b9e\u73b0<\/a>\u4e2d\u7684shader\u4ee3\u7801\uff0c\u5c31\u53ef\u4ee5\u7406\u89e3\u4e3a\u4ec0\u4e48\u4e0d\u540c\u9884\u4e58\u6a21\u5f0f\u7684\u8d34\u56fe\u4e3a\u4ec0\u4e48\u8981\u4f7f\u7528\u4e0d\u540c\u7684\u6df7\u5408\u6a21\u5f0f\u4e86\u5427\u3002<\/p>\n<p>\u539f\u56e0\u5c31\u662fRGB\u901a\u9053\u4e0eAlpha\u901a\u9053\u7684\u4e58\u6cd5\u653e\u5728\u54ea\u4e00\u6b65\u8fdb\u884c\u8ba1\u7b97\u3002<\/p>\n<p>\u8981\u4e48\u9009\u62e9\u4f7f\u7528\u9884\u4e58Alpha\u8d34\u56fe\uff0c\u5728\u8d34\u56fe\u4e2d\u5b58\u7684\u5c31\u662f\u5904\u7406\u597d\u7684\u989c\u8272\uff0c\u8c03\u7528\u8d34\u56fe\u65f6\u51cf\u5c11\u8ba1\u7b97\u91cf\uff0c\u4f46\u9884\u4e58Alpha\u8d34\u56fe\u7684RGB\u901a\u9053\u4e2d\u4fdd\u5b58\u7684\u5c31\u4e0d\u518d\u662f\u539f\u59cb\u7684RGB\u989c\u8272\uff0c\u5982\u679c\u7528\u5230\u539f\u59cbRGB\u989c\u8272\u5c31\u9700\u8981\u989d\u5916\u4e00\u5f20\u8272\u5f69\u8d34\u56fe\u4e86\u3002<\/p>\n<p>\u8981\u4e48\u9009\u62e9\u4f7f\u7528\u76f4\u901aAlpha\u8d34\u56fe\uff0c\u53ef\u4ee5\u7075\u6d3b\u9009\u62e9\u4f7f\u7528RGB\u901a\u9053\uff0c\u5982\u679c\u9700\u8981\u4f7f\u7528\u900f\u660e\u8d34\u56fe\u5c31\u9700\u8981\u5728shader\u4ee3\u7801\u4e2d\u591a\u505a\u4e00\u6b21\u4e58\u6cd5\u4e86\u3002<\/p>\n<p>\u5b9e\u9645\u5728\u5de5\u4f5c\u4e2d\uff0c\u62ff\u5230\u7684\u56fe\u7247\u7d20\u6750\u9884\u4e58Alpha\u548c\u76f4\u901aAlpha\u90fd\u6709\uff0c\u4e00\u822c\u6765\u8bf4\u4e09\u7ef4\u8f6f\u4ef6\u8f93\u51fa\u7684\u6e32\u67d3\u56fe\u7247\u9884\u4e58Alpha\u6bd4\u8f83\u591a\uff0c\u5e73\u9762\u8bbe\u8ba1\u8f6f\u4ef6\u8f93\u51fa\u7684UI\u7d20\u6750\u76f4\u901aAlpha\u6bd4\u8f83\u591a\uff0c\u9700\u8981\u5148\u786e\u8ba4\u518d\u4f7f\u7528\u3002<\/p>\n<h1>\u00a0<\/h1>\n<h1 style=\"text-align: center;\">\u7eb9\u7406\u8fc7\u6ee4\u4e2d\u7684\u4f7f\u7528<\/h1>\n<p>\u5728\u5bf9\u8d34\u56fe\u8fdb\u884c\u65cb\u8f6c\u7f29\u653e\u7b49\u64cd\u4f5c\u65f6\uff0c\u9700\u8981\u901a\u8fc7\u7eb9\u7406\u8fc7\u6ee4\uff08Texture Filtering\uff09\u5904\u7406\uff0c\u8fd9\u65f6\u9700\u8981\u5c06\u76f4\u901aAlpha\u8d34\u56fe\u5904\u7406\u6210\u9884\u4e58Alpha\u8d34\u56fe\u518d\u8fdb\u884c\u8ba1\u7b97\uff0c\u5426\u5219\u4f1a\u9020\u6210\u8272\u5f69\u63d2\u503c\u5f02\u5e38\u3002<\/p>\n<p>\u4ee5\u5e38\u7528\u7684 filtering \u65b9\u5f0f\u7ebf\u6027\u63d2\u503c\u4e3a\u4f8b\uff0c\u4e00\u4e2a\u5bbd2px\u9ad81px\u7684\u56fe\u7247\uff0c\u5de6\u8fb9\u7684\u50cf\u7d20\u662f\u7ea2\u8272\uff0c\u53f3\u8fb9\u662f\u7eff\u827210%\u900f\u660e\u5ea6\uff0c\u5982\u679c\u628a\u8fd9\u4e2a\u56fe\u7247\u7f29\u653e\u52301&#215;1\u7684\u5927\u5c0f\uff0c\u90a3\u4e48\u7f29\u653e\u540e1\u50cf\u7d20\u7684\u989c\u8272\u5c31\u662f\u5de6\u53f3\u4e24\u4e2a\u50cf\u7d20\u7ebf\u6027\u63d2\u503c\u7684\u7ed3\u679c\uff0c\u4e5f\u5c31\u662f\u628a\u4e24\u4e2a\u50cf\u7d20\u5404\u4e2a\u901a\u9053\u52a0\u8d77\u6765\u9664\u4ee52\u6c42\u5e73\u5747\u503c\u3002<\/p>\n<p>\u5982\u679c\u4f7f\u7528\u76f4\u901aAlpha\u7684\u989c\u8272\u8fdb\u884c\u63d2\u503c\uff0c\u90a3\u4e48\u7ed3\u679c\u5c31\u662f\uff1a<\/p>\n<p>([255, 0, 0, 1] + [0, 255, 0, 0.1]) * 0.5 = [127, 127, 0, 0.55]<\/p>\n<p>\u5982\u679c\u4f7f\u7528\u9884\u4e58Alpha\u7684\u989c\u8272\u8fdb\u884c\u63d2\u503c\uff0c\u90a3\u4e48\u7ed3\u679c\u5219\u662f\uff1a<\/p>\n<p>([255, 0, 0, 1] + [0, 25, 0, 0.1]) * 0.5 = [127, 25, 0, 0.55]\uff08\u6b64\u5904\u7ed3\u679c\u5e94\u4e3a[127, 12, 0, 0.55]\uff09<\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-3486 aligncenter\" src=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/PremultAlpha_01.jpg\" alt=\"\" width=\"600\" height=\"150\" srcset=\"https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/PremultAlpha_01.jpg 600w, https:\/\/www.yumefx.com\/wp-content\/uploads\/2021\/09\/PremultAlpha_01-300x75.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u4e0a\u56fe\u4e2d\u7684\u7b2c\u4e09\u4e2a\u989c\u8272\u662f\u76f4\u901aAlpha\u63d2\u503c\u540e\u7684\u7ed3\u679c\uff0c\u7b2c\u56db\u4e2a\u989c\u8272\u662f\u9884\u4e58Alpha\u63d2\u503c\u540e\u7684\u7ed3\u679c\uff0c\u663e\u7136\u540e\u8005\u66f4\u7b26\u5408\u76f4\u89c9\uff0c\u56e0\u4e3a\u76f4\u901aAlpha\u7684\u989c\u8272\u6ca1\u6709\u4e58\u4ee5Alpha\uff0c\u5bfc\u81f4\u5728\u7ebf\u6027\u63d2\u503c\u65f6\u5360\u4e86\u8fc7\u5927\u7684\u6743\u91cd\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u5148\u5904\u7406\u6210\u9884\u4e58Alpha\u6a21\u5f0f\uff0c\u518d\u8fdb\u884cfiltering\u3002<\/p>\n<p>\u00a0<\/p>\n<p>\u672c\u6587\u90e8\u5206\u8f6c\u8f7d\u81ea<a href=\"https:\/\/blog.csdn.net\/manlinniao\/article\/details\/82716282\">\u56fe\u7247Alpha\u9884\u4e58\u7684\u4f5c\u7528<\/a>\uff0c\u6709\u4fee\u6539\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u4ed6\u4eec\u5174\u9ad8\u91c7\u70c8\u5730\uff0c<br \/>\u8fc7\u7740\u4e00\u6210\u4e0d\u53d8\u7684\u751f\u6d3b\u3002<\/p>\n<p style=\"text-align: right;\">\u2014\u2014\u5948\u4fdd\u5c14<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u5728\u524d\u6587\u900f\u660e\u8d34\u56fe\u5b9e\u73b0\u4e2d\u7684AB\u900f\u6df7\u548cAD\u900f\u53e0\u5b9e\u73b0\u4ee3\u7801\u4e2d\uff0c\u6709\u63d0\u5230\u9884\u4e58\u8fd9\u4e2a\u540d\u8bcd\uff0c\u6839\u636e\u8d34\u56fe\u662f\u5426\u9884\u4e58Alpha\uff0c\u4ee3\u7801 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3478,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,69],"tags":[14,80,72],"_links":{"self":[{"href":"https:\/\/www.yumefx.com\/index.php?rest_route=\/wp\/v2\/posts\/3453"}],"collection":[{"href":"https:\/\/www.yumefx.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yumefx.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yumefx.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yumefx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3453"}],"version-history":[{"count":0,"href":"https:\/\/www.yumefx.com\/index.php?rest_route=\/wp\/v2\/posts\/3453\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yumefx.com\/index.php?rest_route=\/wp\/v2\/media\/3478"}],"wp:attachment":[{"href":"https:\/\/www.yumefx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yumefx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yumefx.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}