{"id":4272,"date":"2016-06-26T14:12:58","date_gmt":"2016-06-26T06:12:58","guid":{"rendered":"http:\/\/unitycoder.com\/blog\/?p=4272"},"modified":"2016-06-26T14:13:14","modified_gmt":"2016-06-26T06:13:14","slug":"unlit-fake-curved-world-shader","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2016\/06\/26\/unlit-fake-curved-world-shader\/","title":{"rendered":"Unlit Fake Curved World Shader"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4273\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2016\/06\/26\/unlit-fake-curved-world-shader\/curved_world\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/06\/curved_world.gif?fit=376%2C249&amp;ssl=1\" data-orig-size=\"376,249\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"curved_world\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/06\/curved_world.gif?fit=376%2C249&amp;ssl=1\" class=\"alignnone size-full wp-image-4273\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/06\/curved_world.gif?resize=376%2C249\" alt=\"curved_world\" width=\"376\" height=\"249\" \/><\/p>\n<p>Tried to get world position from depth texture, but it didn&#8217;t work.. then founded COMPUTE_DEPTH_01 instead,<br \/>\nmakes nice curve effect when applied to meshes (pushing the y vertices down based on depth).. although breaks a bit depending on camera rotation\/position..<\/p>\n<p><strong>Shader source:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Shaders\/Vertex\/UnlitFakeCurved.shader\" target=\"_blank\">https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Shaders\/Vertex\/UnlitFakeCurved.shader<\/a><\/p>\n<p>without curve-shader:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4274\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2016\/06\/26\/unlit-fake-curved-world-shader\/withoutcurve\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/06\/withoutcurve.jpg?fit=851%2C203&amp;ssl=1\" data-orig-size=\"851,203\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"withoutcurve\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/06\/withoutcurve.jpg?fit=851%2C203&amp;ssl=1\" class=\"alignnone size-medium wp-image-4274\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/06\/withoutcurve-300x72.jpg?resize=300%2C72\" alt=\"withoutcurve\" width=\"300\" height=\"72\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/06\/withoutcurve.jpg?resize=300%2C72&amp;ssl=1 300w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/06\/withoutcurve.jpg?resize=768%2C183&amp;ssl=1 768w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/06\/withoutcurve.jpg?w=851&amp;ssl=1 851w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>But if you are looking for nicer curve effect, here&#8217;s one:<br \/>\n<a href=\"https:\/\/alastaira.wordpress.com\/2013\/10\/25\/animal-crossing-curved-world-shader\/\"> https:\/\/alastaira.wordpress.com\/2013\/10\/25\/animal-crossing-curved-world-shader\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tried to get world position from depth texture, but it didn&#8217;t work.. then founded COMPUTE_DEPTH_01 instead, makes nice curve effect when applied to meshes (pushing the y vertices down based on depth).. although breaks a bit depending on camera rotation\/position.. Shader source: https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Shaders\/Vertex\/UnlitFakeCurved.shader without curve-shader: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4275,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Unlit Fake Curved World Shader","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[13,3],"tags":[879,200,14,33],"class_list":["post-4272","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-shaders","category-unity3d","tag-curve","tag-depth","tag-shader","tag-vertex"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/06\/curve_depth.jpg?fit=624%2C410&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-16U","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=4272"}],"version-history":[{"count":2,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4272\/revisions"}],"predecessor-version":[{"id":4277,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4272\/revisions\/4277"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/4275"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=4272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=4272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=4272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}