{"id":3438,"date":"2024-09-19T14:00:05","date_gmt":"2024-09-19T06:00:05","guid":{"rendered":"https:\/\/www.caiqinyi.cn\/?p=3438"},"modified":"2025-02-26T10:56:35","modified_gmt":"2025-02-26T02:56:35","slug":"software_occlusion_elimination_development_points","status":"publish","type":"post","link":"https:\/\/www.caiqinyi.cn\/index.php\/2024\/09\/19\/software_occlusion_elimination_development_points\/","title":{"rendered":"\u8f6f\u4ef6\u906e\u6321\u5254\u9664\u5f00\u53d1\u8981\u70b9"},"content":{"rendered":"<p><script type=\"text\/javascript\" async src=\"https:\/\/www.caiqinyi.cn\/wp-content\/MathJax\/MathJax.js?config=TeX-AMS_CHTML\">\n<\/script><br \/>\n<script type=\"text\/x-mathjax-config\">\n    MathJax.Hub.Config({\n        tex2jax: {inlineMath: [['$','$']]},\n        TeX: {equationNumbers: {autoNumber: [\"AMS\"], useLabelIds: true}},\n        \"HTML-CSS\": {linebreaks: {automatic: true}},\n        SVG: {linebreaks: {automatic: true}}\n    });\n<\/script><\/p>\n<p>\u6700\u8fd1\u5728\u5f00\u53d1\u8f6f\u4ef6\u906e\u6321\u5254\u9664(\u4e0b\u7b80\u79f0&#8221;\u8f6f\u906e&#8221;), \u7528\u4ee5\u964d\u4f4e\u79fb\u52a8\u7aef\u4e0a\u906e\u6321\u5254\u9664\u5728GPU\u4e0a\u7684\u538b\u529b, \u7279\u6b64\u8bb0\u5f55\u4e00\u4e9b\u8981\u70b9.<\/p>\n<p><!--more--><\/p>\n<p><strong>\u53c2\u8003\u6750\u6599<\/strong><br \/>\n1. <a href=\"https:\/\/game.academy.163.com\/course\/careerArticle?course=923\">\u3010GDC2023\u5e72\u8d27\u5206\u4eab\u3011\u79fb\u52a8\u5e73\u53f0\u4e0a\u7684\u8f6f\u5149\u6805\u906e\u6321\u5254\u9664\u65b9\u6848<\/a><br \/>\n2. <a href=\"https:\/\/zhuanlan.zhihu.com\/p\/553756415\">games101\u900f\u89c6\u6295\u5f71\u77e9\u9635\u63a8\u5bfc<\/a><\/p>\n<p><strong>1. Reversed-Z<\/strong><\/p>\n<p>\u7531\u4e8e\u5f00\u53d1\u6240\u4f7f\u7528\u7684\u56fe\u5f62API\u4e3aDX12, \u800cDX12\u4e2d\u7684NDC\u6240\u4f7f\u7528\u7684\u7acb\u65b9\u4f53\u7684\u5404\u5750\u6807\u5206\u91cf\u8303\u56f4\u4e3a$[0, 1]$, \u5176\u4f7f\u7528\u7684\u6295\u5f71\u77e9\u9635\u4e3a$$\\begin{bmatrix}<br \/>\n\\frac{1}{r\\tan(\\alpha \/ 2)} &#038; 0 &#038; 0 &#038; 0 \\\\<br \/>\n0 &#038; \\frac{1}{\\tan(\\alpha \/ 2)} &#038; 0 &#038; 0 \\\\<br \/>\n0 &#038; 0 &#038; \\frac{f}{f &#8211; n} &#038; 1 \\\\<br \/>\n0 &#038; 0 &#038; -\\frac{nf}{f &#8211; n} &#038; 0<br \/>\n\\end{bmatrix},$$\u5176\u4e2d, $x = r$\u4e3a\u53f3\u5e73\u9762, $\\tan(\\alpha \/ 2) = -\\frac{1}{n}$.<br \/>\n$\\\\$ \u5c06\u8fdc\u5e73\u9762\u6295\u5f71\u8bbe\u7f6e\u4e3a0, \u53ef\u4ee5\u66f4\u65b9\u4fbf\u5730\u8bbe\u7f6e\u6df1\u5ea6\u7f13\u51b2\u533a. \u6700\u7ec8\u7684\u6295\u5f71\u77e9\u9635\u5982\u4e0b\u6240\u793a. \u53c2\u6570&#8217;$c$&#8217;\u53ef\u4ee5\u662f\u4efb\u4f55\u6b63\u5b9e\u6570(\u786e\u4fdd\u6295\u5f71\u77e9\u9635\u4e3a\u4e00\u975e\u5947\u5f02\u77e9\u9635). \u53ef\u4ee5\u770b\u5230\u77e9\u9635\u4e2d\u53ea\u67094\u4e2a\u975e\u96f6\u9879, \u6bd4\u539f\u59cb\u77e9\u9635\u5c111\u4e2a\u975e\u96f6\u9879, \u4e5f\u5c31\u610f\u5473\u7740\u6295\u5f71\u901f\u5ea6\u52a0\u5feb\u4e86. \u5b9e\u9645\u4e0a, \u5982\u679c\u4f60\u4f7f\u7528SIMD(Single Instruction Multiple Data, \u5373\u5355\u6307\u4ee4\u6d41\u591a\u6570\u636e\u6d41) \u4f1a\u5feb\u5f97\u591a.$$M_{proj} = \\begin{bmatrix}<br \/>\na &#038; 0 &#038; 0 &#038; 0 \\\\<br \/>\n0 &#038; b &#038; 0 &#038; 0 \\\\<br \/>\n0 &#038; 0 &#038; 0 &#038; 0 \\\\<br \/>\n0 &#038; 0 &#038; c(>0) &#038; 0<br \/>\n\\end{bmatrix}.$$<br \/>\n<strong>2. \u751f\u6210Occluder Mesh<\/strong><\/p>\n<p>\u9ad8\u8d28\u91cf\u7684Occluder Mesh, \u5177\u5907\u4ee5\u4e0b\u4e24\u70b9\u8981\u6c42:<br \/>\n1) \u4fdd\u6301\u51e0\u4f55\u8f6e\u5ed3;<br \/>\n2) \u5c3d\u53ef\u80fd\u4f4e\u7684\u4e09\u89d2\u9762\u6570.<\/p>\n<p>\u7531\u4e8eOccluder Mesh\u5e76\u4e0d\u7528\u4e8e\u5b9e\u9645\u7684\u6e32\u67d3, \u5728\u751f\u6210\u8fc7\u7a0b\u4e2d\u5e76\u4e0d\u9700\u8981\u8003\u8651\u5404\u7c7bAttribute\u7684\u53d8\u6362(\u5305\u62ecUV, \u6cd5\u7ebf\u7b49), \u6545\u6211\u4eec\u6ca1\u6709\u9009\u62e9\u91c7\u7528\u4f20\u7edf\u7684\u8fb9\u574d\u7f29\u7b97\u6cd5\u53bb\u751f\u6210Occluder Mesh, \u800c\u662f\u91c7\u7528\u66f4\u6fc0\u8fdb\u7684\u51cf\u9762\u7b97\u6cd5(\u91cd\u65b0\u7f51\u683c\u5316) , \u5728\u4fdd\u6301\u51e0\u4f55\u8f6e\u5ed3\u7684\u540c\u65f6\u5c06\u4e09\u89d2\u9762\u6570\u5c3d\u53ef\u80fd\u964d\u81f3\u6700\u4f4e. \u7b97\u6cd5\u6b65\u9aa4\u5927\u81f4\u5982\u4e0b\u6240\u793a:<br \/>\n1) \u8ba1\u7b97\u8f93\u5165Mesh\u7684AABB\u7a7a\u95f4\u7ed3\u6784;<br \/>\n2) \u6839\u636e\u8f93\u5165Mesh\u7684AABB\u7a7a\u95f4\u7ed3\u6784\u5728\u8f93\u5165Mesh\u4e0a\u91c7\u6837\u79cd\u5b50\u70b9;<br \/>\n3) \u8ba1\u7b97\u5404\u4e2a\u79cd\u5b50\u70b9\u7684Winding Number(\u53ef\u901a\u8fc7SDF\u52a0\u901f\u8ba1\u7b97), \u5f97\u5230\u8f93\u5165Mesh\u76840-\u7b49\u503c\u9762(\u8868\u9762);<br \/>\n4) \u5bf9\u4e0a\u8ff0\u6b65\u9aa4\u5f97\u5230\u76840-\u7b49\u503c\u9762\u6267\u884c\u57fa\u4e8e\u4f53\u7d20\u7684\u4fdd\u6301\u51e0\u4f55\u8f6e\u5ed3\u7684\u51cf\u9762\u7b97\u6cd5.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u5f00\u53d1\u8f6f\u4ef6\u906e\u6321\u5254\u9664(\u4e0b\u7b80\u79f0&#8221;\u8f6f\u906e&#8221;), \u7528\u4ee5\u964d\u4f4e\u79fb\u52a8\u7aef\u4e0a\u906e\u6321\u5254\u9664\u5728GPU\u4e0a\u7684\u538b\u529b, &hellip; <a href=\"https:\/\/www.caiqinyi.cn\/index.php\/2024\/09\/19\/software_occlusion_elimination_development_points\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u8f6f\u4ef6\u906e\u6321\u5254\u9664\u5f00\u53d1\u8981\u70b9<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,24,9,5,27],"tags":[],"_links":{"self":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/3438"}],"collection":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/comments?post=3438"}],"version-history":[{"count":11,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/3438\/revisions"}],"predecessor-version":[{"id":3596,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/3438\/revisions\/3596"}],"wp:attachment":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/media?parent=3438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/categories?post=3438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/tags?post=3438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}