{"id":2202,"date":"2020-08-21T23:20:28","date_gmt":"2020-08-21T15:20:28","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=2202"},"modified":"2020-08-21T23:20:28","modified_gmt":"2020-08-21T15:20:28","slug":"shader%e8%b8%a9%e5%9d%91%e8%ae%b0%ef%bc%9asv_position%e5%bf%85%e9%a1%bb%e5%a3%b0%e6%98%8e%e4%b8%ba%e7%ac%ac%e4%b8%80%e4%b8%aa","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=2202","title":{"rendered":"[Shader]\u8e29\u5751\u8bb0\uff1aSV_POSITION\u5fc5\u987b\u58f0\u660e\u4e3a\u7b2c\u4e00\u4e2a"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>struct VS\n{\n  float2 uv : TEXCOORD0;\n  float4 position : SV_POSITION;\n};<\/code><\/pre>\n\n\n\n<p>\u8868\u73b0\u4e3a\uff1a\u5728\u7535\u8111\u4e0a\u663e\u793a\u6b63\u5e38\uff0c\u4f46\u662f\u5728\u624b\u673a\u4e0a\u663e\u793a\u4e3a\u4e00\u7247\u7c89\u7ea2\uff0c\u600e\u4e48\u67e5\u4e5f\u6ca1\u67e5\u51fa\u95ee\u9898\u6765\uff0c\u540e\u9762\u5076\u7136\u628aposition\u548cuv\u4e92\u6362\u4f4d\u7f6e\uff0c\u95ee\u9898\u4fee\u6b63\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>struct VS\n{\n  float4 position : SV_POSITION;\n  float2 uv : TEXCOORD0;\n};<\/code><\/pre>\n\n\n\n<p><a href=\"https:\/\/forum.unity.com\/threads\/why-must-sv_position-be-the-first-output.245327\/\">\u76f8\u540c\u95ee\u9898<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8868\u73b0\u4e3a\uff1a\u5728\u7535\u8111\u4e0a\u663e\u793a\u6b63\u5e38\uff0c\u4f46\u662f\u5728\u624b\u673a\u4e0a\u663e\u793a\u4e3a\u4e00\u7247\u7c89\u7ea2\uff0c\u600e\u4e48\u67e5\u4e5f\u6ca1\u67e5\u51fa\u95ee\u9898\u6765\uff0c\u540e\u9762\u5076\u7136\u628aposition\u548cuv\u4e92 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2202"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2202"}],"version-history":[{"count":1,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2202\/revisions"}],"predecessor-version":[{"id":2203,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2202\/revisions\/2203"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}