{"id":1830,"date":"2020-04-23T14:08:34","date_gmt":"2020-04-23T06:08:34","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=1830"},"modified":"2020-04-24T12:25:19","modified_gmt":"2020-04-24T04:25:19","slug":"unityunwrap-uv","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=1830","title":{"rendered":"[Unity]Unwrap uv"},"content":{"rendered":"\n<p>Unity\u4e2d\u5982\u4f55\u5c06\u6a21\u578b\u7684UV\u5c55\u5f00\u5462\uff1f\u7b97\u6cd5\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>v2f vs (appdata v)\n{\n    v2f o;\n    o.vertex = float4(v.uv0.x * 2.0 - 1.0, v.uv0.y * 2.0 - 1.0, 0.5, 1.0);\n    o.uv = ComputeScreenPos(o.vertex);\n    return o;\n}\n\nhalf4 ps(v2f i):SV_Target\n{\n    fixed4 col = tex2D(_MainTexture, i.uv);\n    return half4(col.xyz, 1);\n}\n\n\u8bb0\u5f97\u6dfb\u52a0Cull Off\n\u4e0d\u7136\u6e32\u67d3\u4e0d\u51fa\u6765\uff01\uff01<\/code><\/pre>\n\n\n\n<p>\u90a3\u5c55\u5f00UV\u6709\u5565\u7528\u5462\uff1f\u6bd4\u5982\u70d8\u7119\u9634\u5f71\uff0c\u5149\u7167\u56fe\u3002\u3002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unity\u4e2d\u5982\u4f55\u5c06\u6a21\u578b\u7684UV\u5c55\u5f00\u5462\uff1f\u7b97\u6cd5\u5982\u4e0b\uff1a \u90a3\u5c55\u5f00UV\u6709\u5565\u7528\u5462\uff1f\u6bd4\u5982\u70d8\u7119\u9634\u5f71\uff0c\u5149\u7167\u56fe\u3002\u3002\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","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\/1830"}],"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=1830"}],"version-history":[{"count":4,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1830\/revisions"}],"predecessor-version":[{"id":1835,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1830\/revisions\/1835"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}