{"id":5615,"date":"2023-02-22T10:19:26","date_gmt":"2023-02-22T08:19:26","guid":{"rendered":"https:\/\/unitycoder.com\/blog\/?p=5615"},"modified":"2023-02-22T10:19:26","modified_gmt":"2023-02-22T08:19:26","slug":"fake-3d-parallax-effect-using-shader-pre-generated-depth-map","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2023\/02\/22\/fake-3d-parallax-effect-using-shader-pre-generated-depth-map\/","title":{"rendered":"Fake 3D Parallax Effect using Shader &#038; (Pre-generated) Depth Map"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2023\/02\/depth.gif?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"223\" height=\"185\" data-attachment-id=\"5616\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2023\/02\/22\/fake-3d-parallax-effect-using-shader-pre-generated-depth-map\/depth\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2023\/02\/depth.gif?fit=223%2C185&amp;ssl=1\" data-orig-size=\"223,185\" 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=\"depth\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2023\/02\/depth.gif?fit=223%2C185&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2023\/02\/depth.gif?resize=223%2C185&#038;ssl=1\" alt=\"\" class=\"wp-image-5616\"\/><\/a><\/figure>\n\n\n\n<p>Cool effect: <a href=\"http:\/\/depthy.stamina.pl\/#\/sample\/mango\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/depthy.stamina.pl\/#\/sample\/mango<\/a><\/p>\n\n\n\n<p>Converted this few lines into unity shader:<br><a href=\"https:\/\/gist.github.com\/bozzin\/5895d97130e148e66b88ff4c92535b59\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/gist.github.com\/bozzin\/5895d97130e148e66b88ff4c92535b59<\/a><\/p>\n\n\n\n<p><strong>Finished shader<\/strong>  (unlit, build in pipeline) + mouse position script:<br><a rel=\"noreferrer noopener\" href=\"https:\/\/gist.github.com\/unitycoder\/696a07c9de34e6a8fd28dc7de2362501\" target=\"_blank\">https:\/\/gist.github.com\/unitycoder\/696a07c9de34e6a8fd28dc7de2362501<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/R0RNLqnRv3g?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<\/div><figcaption>making of<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Cool effect: http:\/\/depthy.stamina.pl\/#\/sample\/mango Converted this few lines into unity shader:https:\/\/gist.github.com\/bozzin\/5895d97130e148e66b88ff4c92535b59 Finished shader (unlit, build in pipeline) + mouse position script:https:\/\/gist.github.com\/unitycoder\/696a07c9de34e6a8fd28dc7de2362501<\/p>\n","protected":false},"author":1,"featured_media":5616,"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":"","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":[1],"tags":[200,1257,14],"class_list":["post-5615","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-depth","tag-parallax","tag-shader"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2023\/02\/depth.gif?fit=223%2C185&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-1sz","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5615","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=5615"}],"version-history":[{"count":1,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5615\/revisions"}],"predecessor-version":[{"id":5617,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5615\/revisions\/5617"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/5616"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=5615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=5615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=5615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}