{"id":292970,"date":"2019-08-05T09:00:09","date_gmt":"2019-08-05T09:00:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=292970"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=292970","title":{"rendered":"\u0428\u0435\u0439\u0434\u0435\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043a\u0430\u0440\u0442 \u0432 Unity"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/511\/6a1\/e02\/5116a1e02debfaa58afe0cddf3b4c6c9.png\" alt=\"image\"><\/div>\n<p>  \u042d\u0442\u043e\u0442 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d <strong>\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043a\u0430\u0440\u0442\u0430\u043c<\/strong> \u0438 \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0432 Unity \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u0438\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0433\u043e\u043b\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043f\u0435\u0441\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0430 \u0438\u0437 \u0444\u0438\u043b\u044c\u043c\u0430 \u00ab\u0427\u0451\u0440\u043d\u0430\u044f \u043f\u0430\u043d\u0442\u0435\u0440\u0430\u00bb.<\/p>\n<p>  \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u0441\u0442\u0430\u043b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <a href=\"https:\/\/twitter.com\/brnkhy\" rel=\"noopener\">Baran Kahyaoglu<\/a> \u0442\u0432\u0438\u0442, \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0434\u043b\u044f <a href=\"https:\/\/twitter.com\/Mapbox\" rel=\"noopener\">Mapbox<\/a>.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<div class=\"oembed\">\n<blockquote class=\"twitter-tweet\" data-lang=\"en_US\">\n<p lang=\"en\" dir=\"ltr\">Nothing really special this time, no shader\/vfx magic, it&#8217;s just an interactive map (with pan&amp;zoom) on the same table\/environment. <br \/>It uses new <a href=\"https:\/\/twitter.com\/hashtag\/unity?src=hash&amp;ref_src=twsrc%5Etfw\">#unity<\/a> HDRP though so it looks very cool compared to regular boring topdown maps.<a href=\"https:\/\/twitter.com\/hashtag\/gamedev?src=hash&amp;ref_src=twsrc%5Etfw\">#gamedev<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/madewithunity?src=hash&amp;ref_src=twsrc%5Etfw\">#madewithunity<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/builtwithmapbox?src=hash&amp;ref_src=twsrc%5Etfw\">#builtwithmapbox<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/map?src=hash&amp;ref_src=twsrc%5Etfw\">#map<\/a> <a href=\"https:\/\/t.co\/hUgZqfloUK\">pic.twitter.com\/hUgZqfloUK<\/a><\/p>\n<p>\u2014 Baran Kahyaoglu (@brnkhy) <a href=\"https:\/\/twitter.com\/brnkhy\/status\/1118609807844442112?ref_src=twsrc%5Etfw\">April 17, 2019<\/a><\/p><\/blockquote>\n<p> <script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script> <\/div>\n<p>  <\/p>\n<div class=\"oembed\">\n<blockquote class=\"twitter-tweet\" data-lang=\"en_US\">\n<p lang=\"en\" dir=\"ltr\">and even though there&#8217;s nothing special about it, it&#8217;s so much fun to move around because it just looks good.<br \/>It was hard to record in HD because of the mouse movement but here&#8217;s a low quality one. <a href=\"https:\/\/t.co\/ileBzYwHO9\">pic.twitter.com\/ileBzYwHO9<\/a><\/p>\n<p>\u2014 Baran Kahyaoglu (@brnkhy) <a href=\"https:\/\/twitter.com\/brnkhy\/status\/1118610439049494540?ref_src=twsrc%5Etfw\">April 17, 2019<\/a><\/p><\/blockquote>\n<p> <script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script> <\/div>\n<p>  \u0421\u0446\u0435\u043d\u0430 (\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u0430\u0440\u0442\u044b) \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 \u0434\u0435\u043c\u043e Unity Visual Effect Graph Spaceship (\u0441\u043c. \u043d\u0438\u0436\u0435), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c <a href=\"https:\/\/github.com\/Unity-Technologies\/VisualEffectGraph-Samples\" rel=\"noopener\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/rqMcPZoEc3U?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 1. \u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0448\u0438\u043d<\/h2>\n<p>  <\/p>\n<h2>\u0410\u043d\u0430\u0442\u043e\u043c\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0430<\/h2>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u2014 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u0430\u0440\u0442\u044b <em>\u043f\u043b\u043e\u0441\u043a\u0438<\/em>: \u0435\u0441\u043b\u0438 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0435\u043a\u0441\u0442\u0443\u0440, \u0442\u043e \u0438\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0442\u0440\u0451\u0445\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u044b \u0438\u043c\u0435\u043b\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f 3D-\u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u044b.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0441\u043e\u0437\u0434\u0430\u0442\u044c 3D-\u043c\u043e\u0434\u0435\u043b\u044c \u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0443\u0436\u043d\u0430 \u0432 \u0438\u0433\u0440\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0451 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0438\u0437 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u0430\u0440\u0442\u044b. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442 \u00ab\u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438\u00bb \u0438\u0437 \u0432\u0438\u0434\u0435\u043e Baran Kahyaoglu.<\/p>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 3D-\u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0448\u0435\u0439\u0434\u0435\u0440\u044b. \u0421 \u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c \u0432 \u0434\u043e\u043b\u0438\u043d\u044b \u0438 \u0433\u043e\u0440\u044b \u043d\u0443\u0436\u043d\u043e\u0439 \u043d\u0430\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u0430\u0440\u0442\u0443 <a href=\"https:\/\/www.google.com\/maps\/place\/Quillota,+Valparaiso+Region,+Chile\/\" rel=\"noopener\">\u043a\u043e\u043c\u043c\u0443\u043d\u044b \u041a\u0438\u043b\u044c\u043e\u0442\u0430<\/a> \u0432 \u0427\u0438\u043b\u0438, \u0437\u043d\u0430\u043c\u0435\u043d\u0438\u0442\u043e\u0439 \u0441\u0432\u043e\u0438\u043c\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u043c\u0438 \u0445\u043e\u043b\u043c\u0430\u043c\u0438. \u041d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043d\u0430\u043d\u0435\u0441\u0451\u043d\u043d\u0430\u044f \u043d\u0430 \u043a\u0440\u0443\u0433\u043b\u044b\u0439 \u043c\u0435\u0448.<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5a7\/b64\/0a6\/5a7b640a60ca2ce42c9d4ee3f5c95150.png\" width=\"797\" height=\"346\"><\/div>\n<p>  \u0425\u043e\u0442\u044c \u043c\u044b \u0438 \u0432\u0438\u0434\u0438\u043c \u0445\u043e\u043b\u043c\u044b \u0438 \u0433\u043e\u0440\u044b, \u043e\u043d\u0438 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u043b\u043e\u0441\u043a\u0438\u0435. \u042d\u0442\u043e \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0435\u0442 \u0438\u043b\u043b\u044e\u0437\u0438\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u043c\u0430.<\/p>\n<h2>\u042d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439<\/h2>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u0445\u043d\u0438\u043a\u0430 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <strong>\u00ab\u044d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439\u00bb (normal extrusion)<\/strong>. \u0415\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <strong>\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u0435\u0440\u0448\u0438\u043d<\/strong>: \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430\u044f \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438 3D-\u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>  \u0421\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0432\u0435\u0440\u0448\u0438\u043d \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u0448\u0435\u0439\u0434\u0435\u0440\u0430. \u0412 \u044d\u0442\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c <strong>Surface Standard Shader<\/strong> \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u0442\u0438\u043f\u043e\u0432 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432 Unity.<\/p>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438 3D-\u043c\u043e\u0434\u0435\u043b\u0438. \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u0435\u0440\u0432\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u043d\u044b\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u0430\u043c \u2014 \u044d\u0442\u043e <strong>\u044d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439<\/strong>. \u041e\u043d \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u044b\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043d\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u00ab\u043d\u0430\u0440\u0443\u0436\u0443\u00bb (<em>\u044d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438<\/em>), \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0430\u0451\u0442 3D-\u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437\u0434\u0443\u0442\u044b\u0439 \u0432\u0438\u0434. \u00ab\u041d\u0430\u0440\u0443\u0436\u0443\u00bb \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u0430 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u0432\u0434\u043e\u043b\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/275\/3e4\/fe3\/2753e4fe3502d77d46d7205e1ec81809.png\"><\/div>\n<p>  \u0414\u043b\u044f \u0433\u043b\u0430\u0434\u043a\u0438\u0445 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0435\u0439 \u044d\u0442\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u0432 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u0441 \u043f\u043b\u043e\u0445\u0438\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u0440\u0448\u0438\u043d \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b. \u042d\u0442\u043e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0451\u043d \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043c\u043e\u0438\u0445 \u043f\u0435\u0440\u0432\u044b\u0445 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432: <a href=\"https:\/\/www.alanzucconi.com\/2015\/06\/10\/a-gentle-introduction-to-shaders-in-unity3d\/\" rel=\"noopener\">A Gentle Introduction to Shaders<\/a>, \u0433\u0434\u0435 \u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a <strong>\u044d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/strong> \u0438 <strong>\u0438\u043d\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/strong> 3D-\u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5a8\/668\/0e5\/5a86680e5ab92b536d4999e693aed8cb.gif\" width=\"485\" height=\"278\"><\/div>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439 \u0432 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u044b\u0439 \u0448\u0435\u0439\u0434\u0435\u0440 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e\u0433\u043e \u0448\u0435\u0439\u0434\u0435\u0440\u0430 \u0435\u0441\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>#pragma<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>vert<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b 3D-\u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>vert<\/code>.<\/p>\n<p>  \u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0435\u0439\u0434\u0435\u0440 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">#pragma surface surf Standard fullforwardshadows addshadow vertex:vert ... float _Amount; ... void vert(inout appdata_base v) {     v.vertex.xyz += v.normal * _Amount; }<\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432\u0435\u0440\u0448\u0438\u043d, \u043d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>addshadow<\/code>, \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043b\u0430 \u0442\u0435\u043d\u0438 \u043d\u0430 \u0441\u0430\u043c\u0443 \u0441\u0435\u0431\u044f.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 appdata_base?<\/b><\/p>\n<div class=\"spoiler_text\">\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0432\u0435\u0440\u0448\u0438\u043d (<code>vert<\/code>), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <em>\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443<\/em> \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>appdata_base<\/code>. \u042d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0445\u0440\u0430\u043d\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u0435 3D-\u043c\u043e\u0434\u0435\u043b\u0438. \u041e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e <em>\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u044b<\/em> (<code>v.vertex<\/code>), \u043d\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u043b\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <em>\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438<\/em> (<code>v.normal<\/code>) \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 \u0432\u0435\u0440\u0448\u0438\u043d\u043e\u0439 <em>\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0435<\/em> (<code>v.texcoord<\/code>).<\/p>\n<p>  \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438 \u043d\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <em>\u0446\u0432\u0435\u0442 \u0432\u0435\u0440\u0448\u0438\u043d\u044b<\/em> (<code>v.color<\/code>) \u0438 <em>\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439<\/em> (<code>v.tangent<\/code>). \u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0432\u0435\u0440\u0448\u0438\u043d \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 <code>appdata_tan<\/code> \u0438 <code>appdata_full<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0446\u0435\u043d\u043e\u0439 \u043c\u0430\u043b\u044b\u0445 \u0437\u0430\u0442\u0440\u0430\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e <code>appdata<\/code> (\u0438 \u0435\u0451 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445) \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/wiki.unity3d.com\/index.php\/Shader_Code\" rel=\"noopener\">Unity3D wiki<\/a>.<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0430\u043a \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 vert?<\/b><\/p>\n<div class=\"spoiler_text\">\u0412\u0435\u0440\u0448\u0438\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u044f\u0437\u044b\u043a\u043e\u043c C#, \u0442\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 <code>v.vertex<\/code> \u044d\u0442\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043a\u043e\u043f\u0438\u044e <code>v<\/code>, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u0442\u0435\u043b\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e <code>v<\/code> \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a <code>inout<\/code>, \u0438 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430, \u0438 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430. \u041b\u044e\u0431\u044b\u0435 \u0432\u043d\u043e\u0441\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u0430\u043c\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0432 <code>vert<\/code>. \u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 <code>inout<\/code> \u0438 <code>out<\/code> \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0435, \u0438 \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0441 <code>ref<\/code> \u0438 <code>out<\/code> \u0432 C#.<\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u042d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439 \u0441 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430\u043c\u0438<\/h2>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u0432\u044b\u0448\u0435 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043d\u043e \u043e\u043d \u0434\u0430\u043b\u0451\u043a \u043e\u0442 \u0442\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0441\u0442\u0438\u0447\u044c. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u044d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043d\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443. \u041c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c 3D-\u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0434\u043e\u043b\u0438\u043d\u0430\u043c \u0438 \u0433\u043e\u0440\u0430\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u0430 \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043a\u0430\u0440\u0442\u044b. \u041c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u044d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043b\u0438\u044f\u043b\u0430 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432\u044b\u0441\u043e\u0442\u044b \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0430. \u0422\u0430\u043a\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <strong>\u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u0432\u0435\u0440\u0448\u0438\u043d (heightmaps)<\/strong>, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <strong>\u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u0433\u043b\u0443\u0431\u0438\u043d (depthmaps)<\/strong>, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u044b\u0441\u043e\u0442\u0430\u0445, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u0430\u0440\u0442\u044b \u0432\u044b\u0441\u043e\u0442. \u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0441\u0445\u0435\u043c\u0435, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u0435\u043c \u0438 \u043e\u043f\u0443\u0441\u043a\u0430\u043d\u0438\u0435\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0f3\/223\/118\/0f32231186763ee73f27bde4a1d2c5bf.png\"><\/div>\n<p>  \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u043f\u0443\u0442\u043d\u0438\u043a\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0439 \u0432\u0430\u0441 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 \u043d\u0435\u0439 \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0441\u043e\u0442. \u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u043f\u0443\u0442\u043d\u0438\u043a\u043e\u0432\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u041c\u0430\u0440\u0441\u0430 (\u0441\u0432\u0435\u0440\u0445\u0443) \u0438 \u043a\u0430\u0440\u0442\u0430 \u0432\u044b\u0441\u043e\u0442 (\u0441\u043d\u0438\u0437\u0443), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u044d\u0442\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b80\/468\/176\/b804681769208dfc72ec69441d9f0986.jpg\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/266\/f0c\/b59\/266f0cb59bb01a7f875d3323d526372a.png\"><\/div>\n<p>  \u042f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043e \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043a\u0430\u0440\u0442\u044b \u0433\u043b\u0443\u0431\u0438\u043d \u0432 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/www.alanzucconi.com\/2019\/01\/01\/facebook-3d-photos\/\" rel=\"noopener\">\u00ab3D-\u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 Facebook \u0438\u0437\u043d\u0443\u0442\u0440\u0438: \u0448\u0435\u0439\u0434\u0435\u0440\u044b \u043f\u0430\u0440\u0430\u043b\u043b\u0430\u043a\u0441\u0430\u00bb<\/a> [<a href=\"https:\/\/habr.com\/ru\/post\/444706\/\">\u043f\u0435\u0440\u0435\u0432\u043e\u0434<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435].<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u0440\u0442\u0430 \u0432\u044b\u0441\u043e\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043a\u0430\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0433\u0440\u0430\u0434\u0430\u0446\u0438\u044f\u0445 \u0441\u0435\u0440\u043e\u0433\u043e, \u0433\u0434\u0435 \u0447\u0451\u0440\u043d\u044b\u0439 \u0438 \u0431\u0435\u043b\u044b\u0439 \u0446\u0432\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0432\u044b\u0441\u043e\u0442\u0430\u043c. \u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c <em>\u043b\u0438\u043d\u0435\u0439\u043d\u043e<\/em>, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0446\u0432\u0435\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 <code>0.1<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0441\u043e\u0442 \u043c\u0435\u0436\u0434\u0443 <code>0<\/code> \u0438 <code>0.1<\/code> \u0438\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 <code>0.9<\/code> \u0438 <code>1.0<\/code>. \u0414\u043b\u044f \u043a\u0430\u0440\u0442 \u0433\u043b\u0443\u0431\u0438\u043d \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0435\u0440\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0445\u0440\u0430\u043d\u044f\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0433\u043b\u0443\u0431\u0438\u043d\u0435 \u0432 <em>\u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0435<\/em>.<\/p>\n<p>  \u0414\u043b\u044f \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: \u0441\u0430\u043c\u0430 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u0438 <strong>UV-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b<\/strong> \u0442\u043e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u0435 <code>texcoord<\/code>, \u0445\u0440\u0430\u043d\u044f\u0449\u0435\u0435\u0441\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 <code>appdata_base<\/code>. \u042d\u0442\u043e UV-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u043e\u0439. \u0421\u044d\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0443\u0440 \u0432 <em>\u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/em> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>tex2D<\/code>, \u043e\u0434\u043d\u0430\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u0432 <code>\u0432\u0435\u0440\u0448\u0438\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/code>, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <code>tex2Dlod<\/code>.<\/p>\n<p>  \u0412 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u043d\u0438\u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>_HeightMap<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u044d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b:<\/p>\n<pre><code class=\"cpp\">sampler2D _HeightMap; ... void vert(inout appdata_base v) {     fixed height = tex2Dlod(_HeightMap, float4(v.texcoord.xy, 0, 0)).r;     vertex.xyz += v.normal * height * _Amount; }<\/code><\/pre>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c tex2D?<br \/>  \u0415\u0441\u043b\u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Unity \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u043b\u044f Standard Surface Shader, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u043d \u0443\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u043d \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u0443\u0435\u0442 <em>\u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443<\/em> (\u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>_MainTex<\/code>) \u0432 <em>\u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/em> (\u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>surf<\/code>) \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>tex2D<\/code>.<\/p>\n<p>  \u0418 \u0432 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, <code>tex2D<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b, \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u043d\u0435\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f, \u0446\u0432\u0435\u0442\u0430 \u0438\u043b\u0438 \u0432\u044b\u0441\u043e\u0442\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e <code>tex2D<\/code> \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0432\u0435\u0440\u0448\u0438\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>tex2D<\/code> <em>\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e<\/em> \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b. \u041e\u043d\u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0448\u0430\u0435\u0442, \u043a\u0430\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0442\u0435\u043a\u0441\u0442\u0443\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043e \u043a\u0430\u043c\u0435\u0440\u044b. \u042d\u0442\u0430 \u0442\u0435\u0445\u043d\u0438\u043a\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>MIP-\u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c (mipmapping)<\/strong>: \u043e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u0434\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445.<\/p>\n<p>  \u0412 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0448\u0435\u0439\u0434\u0435\u0440 \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a\u0443\u044e <strong>MIP-\u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u042d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0435\u0449\u0451 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u0432\u0435\u0440\u0448\u0438\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <code>tex2D<\/code> \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043d\u0435\u0451, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>tex2Dlod<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0434\u0432\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u044d\u0442\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0447\u0451\u0442\u043a\u043e \u0437\u0430\u043c\u0435\u0442\u0435\u043d \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 \u043d\u0438\u0436\u0435<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5a7\/b64\/0a6\/5a7b640a60ca2ce42c9d4ee3f5c95150.png\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c0b\/dbf\/dad\/c0bdbfdadf38764dd3d75ffb69d07dea.png\"><\/div>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435. \u041a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435, \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043b\u044e\u0431\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0435\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043f\u043b\u043e\u0441\u043a\u0430\u044f. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442 \u043a \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c <code>v.normal<\/code> \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0451 \u043d\u0430 <code>float3(0, 1, 0)<\/code>:<\/p>\n<pre><code class=\"cpp\">void vert(inout appdata_base v) {     float3 normal = float3(0, 1, 0);      fixed height = tex2Dlod(_HeightMap, float4(v.texcoord.xy, 0, 0)).r;     vertex.xyz += normal * height * _Amount; }<\/code><\/pre>\n<p>  \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0441\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432 <code>appdata_base<\/code> \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 <strong>\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u043d\u0438 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0446\u0435\u043d\u0442\u0440\u0430 \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 3D-\u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u0435\u0440\u0435\u043d\u043e\u0441, \u043f\u043e\u0432\u043e\u0440\u043e\u0442 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <em>transform<\/em> \u0432 Unity \u043c\u0435\u043d\u044f\u044e\u0442 \u043f\u043e\u0437\u0438\u0446\u0438\u044e, \u043f\u043e\u0432\u043e\u0440\u043e\u0442 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043d\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e 3D-\u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 2. \u042d\u0444\u0444\u0435\u043a\u0442 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438<\/h2>\n<p>  \u0412\u0441\u0451, \u0447\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u044b\u0448\u0435, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c, \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u043a\u043e\u0434, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u044b \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>getVertex<\/code>:<\/p>\n<pre><code class=\"cpp\">float4 getVertex(float4 vertex, float2 texcoord) {     float3 normal = float3(0, 1, 0);      fixed height = tex2Dlod(_HeightMap, float4(texcoord, 0, 0)).r;     vertex.xyz += normal * height * _Amount;     return vertex; }<\/code><\/pre>\n<p>  \u0422\u043e\u0433\u0434\u0430 \u0432\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>vert<\/code> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">void vert(inout appdata_base v) {     vertex = getVertex(v.vertex, v.texcoord.xy); }<\/code><\/pre>\n<p>  \u041c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0442\u0430\u043a \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432 \u043d\u0438\u0436\u0435 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u043e\u0447\u0435\u043a. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0434 \u0441\u0442\u0430\u043d\u0435\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435.<\/p>\n<h2>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 UV-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442<\/h2>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043d\u0430\u0441 \u043a \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>getVertex<\/code> \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b (v.vertex), \u043d\u043e \u0438 \u043e\u0442 \u0435\u0451 UV-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 (<code>v.texcoord<\/code>).<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u044b\u0441\u043e\u0442\u044b \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>vert<\/code>, \u043e\u0431\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 <code>appdata_base<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u0439 \u0442\u043e\u0447\u043a\u0438? \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0437\u0438\u0446\u0438\u044e xyz \u0432 <strong>\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/strong>, \u043d\u043e \u043d\u0435 \u0438\u043c\u0435\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0435\u0451 UV-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.<\/p>\n<p>  \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u043c\u0435\u044e\u0449\u0430\u044f\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u044b\u0441\u043e\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b. \u0422\u0430\u043a\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f UV-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 3D-\u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0437\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0435\u0433\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u044b. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0445\u043d\u0438\u043a \u0435\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u2014 \u044d\u0442\u043e <strong>\u0442\u0440\u0438\u043f\u043b\u0430\u043d\u0430\u0440\u043d\u0430\u044f \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f<\/strong>). \u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c UV \u0441 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0435\u0439. \u0415\u0441\u043b\u0438 \u043c\u044b \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u0448\u0435\u0439\u0434\u0435\u0440 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043a \u043f\u043b\u043e\u0441\u043a\u043e\u043c\u0443 \u043c\u0435\u0448\u0443, \u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439.<\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c <em>UV-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b<\/em> (\u043d\u0438\u0436\u043d\u0435\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435) \u0438\u0437 <em>\u043f\u043e\u0437\u0438\u0446\u0438\u0439 \u0432\u0435\u0440\u0448\u0438\u043d<\/em> (\u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435) \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u043c \u043c\u0435\u0448\u0435 \u0438 \u0442\u0435, \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/147\/614\/a7a\/147614a7a05ba08700aef85be89f3a53.png\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/02f\/ff8\/c42\/02fff8c42dae9fa7de4f7e9598843afe.png\" width=\"359\" height=\"210\"><\/div>\n<p>  \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c <em>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b XZ<\/em> <em>\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u044b<\/em> \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 <em>UV-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b<\/em>.<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/48a\/607\/6b0\/48a6076b06650e1074dd5b0f2f7ed023.png\" width=\"363\" height=\"393\"><\/div>\n<p>  \u0422\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0435\u0439<\/strong>. \u041e\u043d\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u043d\u0430 \u043c\u043e\u0451\u043c \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <a href=\"https:\/\/www.alanzucconi.com\/2016\/01\/06\/colour-interpolation\/\" rel=\"noopener\">The Secrets Of Colour Interpolation<\/a>).<\/p>\n<p>  \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f UV \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9c\/3c8\/e48\/f9c3c8e488ead4696749012f5ece6d13.svg\" alt=\"$0$\" data-tex=\"inline\"><\/math> \u0434\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3e4\/c77\/a6e\/3e4c77a6e7c579a778fa84a18b6f4be0.svg\" alt=\"$1$\" data-tex=\"inline\"><\/math>; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b. \u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438, \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 XZ \u0432 UV \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0445 \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/111\/497\/2af\/1114972aff543b76f154c3680a434674.svg\" alt=\"$X_{min}$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/f26\/528\/d49f265280561673d9e0c4ecdc673d60.svg\" alt=\"$X_{max}$\" data-tex=\"inline\"><\/math><\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7ef\/696\/5ee\/7ef6965eed109de09f7ab002061eb466.svg\" alt=\"$Z_{min}$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f7e\/2ad\/090\/f7e2ad0909d47522f1fd460946fbec8c.svg\" alt=\"$Z_{max}$\" data-tex=\"inline\"><\/math><\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4cc\/04f\/759\/4cc04f759373f89fc97ec3a71f3c72cb.svg\" alt=\"$U_{min}$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/49f\/edc\/db3\/49fedcdb36ab4568c363158d9627e0e1.svg\" alt=\"$U_{max}$\" data-tex=\"inline\"><\/math><\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/072\/975\/a2b\/072975a2bbd9b95e0265ae2ddb7db666.svg\" alt=\"$V_{min}$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/1a8\/f82\/6681a8f826366f4327e0138e847826d0.svg\" alt=\"$V_{max}$\" data-tex=\"inline\"><\/math><\/li>\n<\/ul>\n<p>  \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0438\u0436\u0435:<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/87a\/520\/05c\/87a52005ccc02b02403068fd3e075864.png\" width=\"359\" height=\"210\"><\/div>\n<p>  \u042d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043c\u0435\u0448\u0430. \u041d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 Unity <em>UV-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b<\/em> \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9c\/3c8\/e48\/f9c3c8e488ead4696749012f5ece6d13.svg\" alt=\"$0$\" data-tex=\"inline\"><\/math> \u0434\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3e4\/c77\/a6e\/3e4c77a6e7c579a778fa84a18b6f4be0.svg\" alt=\"$1$\" data-tex=\"inline\"><\/math>, \u0430 <em>\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432\u0435\u0440\u0448\u0438\u043d<\/em> \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/430\/944\/48d\/43094448d117ab9ec8fd3c835032e6a4.svg\" alt=\"$-5$\" data-tex=\"inline\"><\/math> \u0434\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8ab\/510\/937\/8ab5109376d468e7e950011141fdc688.svg\" alt=\"$+5$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u0423\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f XZ \u0432 UV \u0438\u043c\u0435\u044e\u0442 \u0432\u0438\u0434:<\/p>\n<p>  (1) <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7d2\/e5c\/a22\/7d2e5ca229d8fc1c135aaa42e863fc9c.svg\" alt=\"image\"><\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0430\u043a \u043e\u043d\u0438 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f?<\/b><\/p>\n<div class=\"spoiler_text\">\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u043e \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438, \u0442\u043e \u044d\u0442\u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0443\u0433\u0430\u044e\u0449\u0438\u043c\u0438.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043e\u043d\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d07\/cc5\/b26\/d07cc5b26db621faab45e0e0b54ede62.svg\" alt=\"$U$\" data-tex=\"inline\"><\/math>. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430: \u043e\u0434\u0438\u043d \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/111\/497\/2af\/1114972aff543b76f154c3680a434674.svg\" alt=\"$X_{min}$\" data-tex=\"inline\"><\/math> \u0434\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/f26\/528\/d49f265280561673d9e0c4ecdc673d60.svg\" alt=\"$X_{max}$\" data-tex=\"inline\"><\/math>, \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4cc\/04f\/759\/4cc04f759373f89fc97ec3a71f3c72cb.svg\" alt=\"$U_{min}$\" data-tex=\"inline\"><\/math> \u0434\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/49f\/edc\/db3\/49fedcdb36ab4568c363158d9627e0e1.svg\" alt=\"$U_{max}$\" data-tex=\"inline\"><\/math>. \u0412\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d07\/cc5\/b26\/d07cc5b26db621faab45e0e0b54ede62.svg\" alt=\"$U$\" data-tex=\"inline\"><\/math>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0434\u043b\u044f \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b.<\/p>\n<p>  \u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math> \u0438 \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c, \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d07\/cc5\/b26\/d07cc5b26db621faab45e0e0b54ede62.svg\" alt=\"$U$\" data-tex=\"inline\"><\/math> \u0438 \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math> \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 25% \u043e\u0442 \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430, \u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d07\/cc5\/b26\/d07cc5b26db621faab45e0e0b54ede62.svg\" alt=\"$U$\" data-tex=\"inline\"><\/math> \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 25% \u043e\u0442 \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430.<\/p>\n<p>  \u0412\u0441\u0451 \u044d\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u0435:<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/22a\/784\/da1\/22a784da18e327b20b872699a901f0ec.png\" width=\"292\" height=\"202\"><\/div>\n<p>  \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0432\u0435\u0441\u0442\u0438, \u0447\u0442\u043e \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u044f, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u043e\u0442\u0440\u0435\u0437\u043a\u043e\u043c \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0440\u043e\u0437\u043e\u0432\u043e\u043c\u0443, \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435, \u0447\u0442\u043e \u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0438\u043d\u0438\u043c \u043e\u0442\u0440\u0435\u0437\u043a\u043e\u043c \u0438 \u0433\u043e\u043b\u0443\u0431\u044b\u043c:<\/p>\n<p>  (2) <\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/bcc\/9e1\/49e\/bcc9e149ea65e83dd70345dd92784788.png\" height=\"39\" width=\"232\"><\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0448\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d07\/cc5\/b26\/d07cc5b26db621faab45e0e0b54ede62.svg\" alt=\"$U$\" data-tex=\"inline\"><\/math>:<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/737\/266\/0fe\/7372660fe877b0780e4cebc97a6f22f2.png\" height=\"85\" width=\"388\"><\/div>\n<p>  \u0438 \u044d\u0442\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0432\u0438\u0434, \u0447\u0442\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0448\u0435 (1).<\/div>\n<\/div>\n<p>  \u042d\u0442\u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u0434\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">float2 _VertexMin; float2 _VertexMax; float2 _UVMin; float2 _UVMax;  float2 vertexToUV(float4 vertex) {     return         (vertex.xz - _VertexMin) \/ (_VertexMax - _VertexMin)         * (_UVMax - _UVMin) + _UVMin; }<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>getVertex<\/code> \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0435\u0439 <code>v.texcoord<\/code>:<\/p>\n<pre><code class=\"cpp\">float4 getVertex(float4 vertex) {     float3 normal = float3(0, 1, 0);     float2 texcoord = vertexToUV(vertex);      fixed height = tex2Dlod(_HeightMap, float4(texcoord, 0, 0)).r;     vertex.xyz += normal * height * _Amount;     return vertex; }<\/code><\/pre>\n<p>  \u0422\u043e\u0433\u0434\u0430 \u0432\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>vert<\/code> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">void vert(inout appdata_base v) {     v.vertex = getVertex(v.vertex); }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u042d\u0444\u0444\u0435\u043a\u0442 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438<\/h3>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c\u0443 \u043d\u0430\u043c\u0438 \u043a\u043e\u0434\u0443 \u043d\u0430 \u043c\u0435\u0448\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u044f \u043a\u0430\u0440\u0442\u0430. \u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043a\u043e\u0434. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043a\u0430\u0440\u0442\u044b, \u0430 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043d\u0435\u0451 \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0b5\/1c3\/bcd\/0b51c3bcd59365527d3659564768b01b.png\" width=\"530\" height=\"309\"><\/div>\n<p>  \u042d\u0442\u0443 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438: \u0435\u0451 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438 (<code>_CropSize<\/code>) \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 (<code>_CropOffset<\/code>), \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c\u044b\u043c\u0438 \u0432 <em>\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0432\u0435\u0440\u0448\u0438\u043d<\/em> (\u043e\u0442 <code>_VertexMin<\/code> \u0434\u043e <code>_VertexMax<\/code>).<\/p>\n<pre><code class=\"cpp\">\/\/ Cropping float2 _CropSize; float2 _CropOffset;<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u044d\u0442\u0438 \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0449\u0451 \u0440\u0430\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b <code>getVertex<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u043d\u0435 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u044b 3D-\u043c\u043e\u0434\u0435\u043b\u0438, \u0430 \u0434\u043b\u044f \u043e\u0442\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0451\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438.<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c0c\/620\/418\/c0c620418088c383addcaa54328fe0fc.png\" width=\"529\" height=\"589\"><\/div>\n<p>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">void vert(inout appdata_base v) {     float2 croppedMin = _CropOffset;     float2 croppedMax = croppedMin + _CropSize;      \/\/ v.vertex.xz: [_VertexMin, _VertexMax]     \/\/ cropped.xz : [croppedMin, croppedMax]     float4 cropped = v.vertex;     cropped.xz = (v.vertex.xz - _VertexMin) \/ (_VertexMax - _VertexMin)         * (croppedMax - croppedMin) + croppedMin;      v.vertex.y = getVertex(cropped); }<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0430, \u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c <code>_CropOffset<\/code> \u0447\u0435\u0440\u0435\u0437 \u0441\u043a\u0440\u0438\u043f\u0442. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0443\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0443 \u043f\u043e \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0443.<\/p>\n<pre><code class=\"cpp\">public class MoveMap : MonoBehaviour {     public Material Material;     public Vector2 Speed;     public Vector2 Offset;      private int CropOffsetID;      void Start ()     {         CropOffsetID = Shader.PropertyToID(\"_CropOffset\");     } \t     void Update ()     {         Material.SetVector(CropOffsetID, Speed * Time.time + Offset);     } }<\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0435\u0436\u0438\u043c\u0430 <strong>Wrap Mode<\/strong> \u0432\u0441\u0435\u0445 \u0442\u0435\u043a\u0441\u0442\u0443\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>Repeat<\/strong>. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u043e\u0442\u0434\u0430\u043b\u0435\u043d\u0438\u044f\/\u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c <code>_CropSize<\/code>.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 3. \u0417\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u043b\u044c\u0435\u0444\u0430<\/h2>\n<p>  <\/p>\n<h2>\u041f\u043b\u043e\u0441\u043a\u043e\u0435 \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412\u0435\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0417\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a-\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e. \u041f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u0441\u043a\u0440\u0438\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u0441\u0432\u0435\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043b\u043e\u0441\u043a\u043e\u0439.<\/p>\n<p>  \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0447\u0451\u0442\u043a\u043e \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u0436\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445. \u041d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0438\u043c\u0435\u044e\u0449\u0438\u0439\u0441\u044f \u0448\u0435\u0439\u0434\u0435\u0440; \u043d\u0430 \u043d\u0438\u0436\u043d\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c0b\/dbf\/dad\/c0bdbfdadf38764dd3d75ffb69d07dea.png\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/511\/6a1\/e02\/5116a1e02debfaa58afe0cddf3b4c6c9.png\"><\/div>\n<p>  \u0423\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e. \u041d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0432 \u0447\u0451\u043c \u0436\u0435 \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u044d\u043a\u0441\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430 \u043e\u0431\u0449\u0443\u044e \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e Unity \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432\u0435\u0440\u0448\u0438\u043d, \u043d\u043e \u043d\u0435 \u0438\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439. <strong>\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438<\/strong> \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u043a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u2014 \u044d\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b (<em>\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/em>), \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438. <em>\u041d\u043e\u0440\u043c\u0430\u043b\u0438<\/em> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0438\u0433\u0440\u0430\u044e\u0442 \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u0432 \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0438 3D-\u043c\u043e\u0434\u0435\u043b\u0438. \u041e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u044b\u043c\u0438 \u0448\u0435\u0439\u0434\u0435\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u0432\u0435\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 3D-\u043c\u043e\u0434\u0435\u043b\u0438. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0451\u0445\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u0435\u0442 \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u043b\u043e\u0441\u043a\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u043e\u043d \u043e\u0442\u0440\u0430\u0436\u0430\u043b\u0441\u044f \u0431\u044b \u043e\u0442 \u0438\u0437\u043e\u0433\u043d\u0443\u0442\u043e\u0439. \u042d\u0442\u043e\u0442 \u0442\u0440\u044e\u043a \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043d\u0438\u0437\u043a\u043e\u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u0430\u0432\u043d\u044b\u043c\u0438, \u0447\u0435\u043c \u0435\u0441\u0442\u044c \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 (\u0441\u043c. \u043d\u0438\u0436\u0435).<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f6b\/d7c\/443\/f6bd7c443381c1f0e133ee7b7bce05e1.png\"><\/div>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435. \u0413\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044f \u0438\u0441\u043a\u0440\u0438\u0432\u043b\u0451\u043d\u043d\u0430\u044f \u0438 \u043f\u043b\u0430\u0432\u043d\u0430\u044f, \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u0432\u0432\u0435\u0440\u0445, \u0441\u0432\u0435\u0442 \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043e\u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u0430\u044f (\u0441\u043c. \u043d\u0438\u0436\u0435):<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/323\/241\/cde\/323241cdef1b3a41604c579f4fdb509b.png\"><\/div>\n<p>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0440\u043e\u043b\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439 \u0432 \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e <a href=\"https:\/\/docs.unity3d.com\/Manual\/StandardShaderMaterialParameterNormalMap.html\" rel=\"noopener\">Normal Mapping (Bump Mapping)<\/a>, \u0433\u0434\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0446\u0438\u043b\u0438\u043d\u0434\u0440\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0434\u043d\u0443 3D-\u043c\u043e\u0434\u0435\u043b\u044c, \u0438\u0437-\u0437\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439 \u0432\u0435\u0440\u0448\u0438\u043d (\u0441\u043c. \u043d\u0438\u0436\u0435).<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/1b7\/4fc\/15f\/1b74fc15f90516cc80b283953ef12373.png\" width=\"315\" height=\"243\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f93\/544\/d9c\/f93544d9c95a70da71848897f0913676.png\" width=\"347\" height=\"254\"><\/div>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0438 \u0432 Unity, \u043d\u0438 \u0432 \u044f\u0437\u044b\u043a\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432 \u043d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0441\u0447\u0451\u0442\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 3D \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<h2>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439<\/h2>\n<p>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u2014 \u044d\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u043f\u043e\u0441\u0442\u0435 <a href=\"http:\/\/diary.conewars.com\/vertex-displacement-shader\/\" rel=\"noopener\">Vertex Displacement \u2013 Melting Shader Part 1<\/a>, \u0433\u0434\u0435 \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0434\u043b\u044f \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u0442\u0430\u044f\u043d\u0438\u044f 3D-\u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 \u0438\u0433\u0440\u0435 <a href=\"http:\/\/conewars.com\/\" rel=\"noopener\">Cone Wars<\/a>.<\/p>\n<p>  \u0425\u043e\u0442\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 3D-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u0445, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0443\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043d\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <strong>\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438<\/strong>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u0435 \u043d\u0430 2D-\u043a\u0440\u0438\u0432\u043e\u0439 (\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0438\u043d\u044f\u044f \u0441\u0442\u0440\u0435\u043b\u043a\u0430 \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043d\u0438\u0436\u0435).<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e5a\/405\/6be\/e5a4056be62b920d9721a84d7c050ee6.png\" width=\"316\" height=\"346\"><\/div>\n<p>  \u0421 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, <em>\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438<\/em> (\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0438\u043d\u044f\u044f \u0441\u0442\u0440\u0435\u043b\u043a\u0430) \u2014 \u044d\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440, \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u044b\u0439 <strong>\u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439<\/strong>, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0443\u044e \u043d\u0430\u0441 \u0442\u043e\u0447\u043a\u0443 (\u0442\u043e\u043d\u043a\u0443\u044e \u0441\u0438\u043d\u044e\u044e \u043b\u0438\u043d\u0438\u044e). <em>\u041a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e<\/em> \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u043b\u0438\u043d\u0438\u044e, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u043a\u0440\u0438\u0432\u0438\u0437\u043d\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. <strong>\u041a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440<\/strong> \u2014 \u044d\u0442\u043e <em>\u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439.<\/p>\n<p>  \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0430 \u0448\u0430\u0433\u0430: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u044f\u043c\u0443\u044e, <em>\u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e<\/em> \u043a \u043d\u0443\u0436\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435; \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440, \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0435\u0439 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c <em>\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u0438<\/em>).<\/p>\n<h3>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445<\/h3>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f <em>\u043d\u043e\u0440\u043c\u0430\u043b\u0438<\/em> \u043d\u0430\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <em>\u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e<\/em>. \u0415\u0451 \u043c\u043e\u0436\u043d\u043e \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u0432 \u0442\u043e\u0447\u043a\u0443 \u043f\u043e\u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432 \u0435\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043e\u0442\u0440\u0435\u0437\u043a\u0430 \u0440\u044f\u0434\u043e\u043c \u0441 \u0432\u0435\u0440\u0448\u0438\u043d\u043e\u0439. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0442\u0440\u0435\u0437\u043e\u043a, \u0442\u0435\u043c \u0442\u043e\u0447\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0442\u0440\u0438 \u044d\u0442\u0430\u043f\u0430:<\/p>\n<ul>\n<li>\u042d\u0442\u0430\u043f 1. \u0421\u0434\u0432\u0438\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u043f\u043e \u043f\u043b\u043e\u0441\u043a\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438<\/li>\n<li>\u042d\u0442\u0430\u043f 2. \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u043d\u043e\u0432\u043e\u0439 \u0442\u043e\u0447\u043a\u0438<\/li>\n<li>\u042d\u0442\u0430\u043f 3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0451 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u0438\u0436\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/46f\/bd3\/7e8\/46fbd37e868d16ff7ec6f1a164377018.png\"><\/div>\n<p>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u044b \u0434\u0432\u0443\u0445 \u0442\u043e\u0447\u0435\u043a, \u0430 \u043d\u0435 \u043e\u0434\u043d\u043e\u0439. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u0447\u043a\u0438 \u043c\u0435\u0448\u0430. \u041c\u044b \u043d\u0430\u0437\u0432\u0430\u043b\u0438 \u0435\u0451 <code>getVertex<\/code>.<\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0437\u044f\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c \u0435\u0449\u0451 \u0432 \u0434\u0432\u0443\u0445 \u0434\u0440\u0443\u0433\u0438\u0445. \u041e\u0434\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043b\u044f \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u0434\u0440\u0443\u0433\u0430\u044f \u2014 \u0434\u043b\u044f \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0432 \u0434\u0432\u0443\u0445 \u0442\u043e\u0447\u043a\u0430\u0445. \u0421 \u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u044c. \u0415\u0441\u043b\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0435\u0448, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0430, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043b\u043e\u0441\u043a\u0438\u043c, (\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0430\u043a \u0438 \u0435\u0441\u0442\u044c), \u0442\u043e \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043a <code>v.normal<\/code> \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a \u0434\u0432\u0443\u043c \u0442\u043e\u0447\u043a\u0430\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e <code>float3(0, 0, 1)<\/code> \u0438 <code>float3(1, 0, 0)<\/code>. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0441\u0444\u0435\u0440\u044b, \u0442\u043e \u043d\u0430\u0439\u0442\u0438 \u0434\u0432\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a \u0434\u0432\u0443\u043c \u0442\u043e\u0447\u043a\u0430\u043c \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435.<\/p>\n<h3>\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a \u0434\u0432\u0443\u043c \u0442\u043e\u0447\u043a\u0430\u043c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <strong>\u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/strong>. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0439 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<p>  \u0412\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0432\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u043d\u043e\u0432\u044b\u0439. \u0415\u0441\u043b\u0438 \u0434\u0432\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0431\u044b\u043b\u0438 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u043c\u0438 (\u0438\u0445 \u0434\u043b\u0438\u043d\u0430 \u0440\u0430\u0432\u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0435), \u0438 \u043e\u043d\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043f\u043e\u0434 \u0443\u0433\u043b\u043e\u043c 90, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0432\u0435\u043a\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043f\u043e\u0434 90 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043e\u0438\u0445.<\/p>\n<p>  \u041f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0431\u0438\u0432\u0430\u0442\u044c \u0441 \u0442\u043e\u043b\u043a\u0443, \u043d\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a: \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043e\u0441\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0442\u0440\u0435\u0442\u044c\u044e. \u0422\u043e \u0435\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cd4\/d06\/4a6\/cd4d064a6084e03f65f726f9632e4252.svg\" alt=\"$X \\times Y = Z$\" data-tex=\"inline\"><\/math>, \u043d\u043e \u0435\u0449\u0451 \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/785\/5c0\/a0e\/7855c0a0ea6ceda164a6e5c7bcf8440b.svg\" alt=\"$X \\times Z = Y$\" data-tex=\"inline\"><\/math>, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u0430\u043b\u044b\u0439 \u0448\u0430\u0433 (\u0432 \u043a\u043e\u0434\u0435 \u044d\u0442\u043e <code>offset<\/code>), \u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a \u0434\u0432\u0443\u043c \u0442\u043e\u0447\u043a\u0430\u043c \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0443\u0433\u043b\u043e\u043c 90 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u0438 \u043e\u043d\u0438 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u0442\u0440\u0438 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043e\u0441\u0438, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u0434\u043e\u043b\u044c \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>  \u0417\u043d\u0430\u044f \u044d\u0442\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0438.<\/p>\n<pre><code class=\"cpp\">void vert(inout appdata_base v) {     float3 bitangent = float3(1, 0, 0);     float3 tangent   = float3(0, 0, 1);      float offset = 0.01;      float4 vertexBitangent = getVertex(v.vertex + float4(bitangent * offset, 0) );     float4 vertex          = getVertex(v.vertex);     float4 vertexTangent   = getVertex(v.vertex + float4(tangent   * offset, 0) );      float3 newBitangent = (vertexBitangent - vertex).xyz;     float3 newTangent   = (vertexTangent   - vertex).xyz;      v.normal = cross(newTangent, newBitangent);     v.vertex.y = vertex.y; }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0421\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438 \u044d\u0444\u0444\u0435\u043a\u0442 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438.<\/p>\n<pre><code class=\"cpp\">void vert(inout appdata_base v) {     \/\/ v.vertex.xz: [_VertexMin, _VertexMax]     \/\/ cropped.xz : [croppedMin, croppedMax]     float2 croppedMin = _CropOffset;     float2 croppedMax = croppedMin + _CropSize;      float4 cropped = v.vertex;     cropped.xz = (v.vertex.xz - _VertexMin) \/ (_VertexMax - _VertexMin)         * (croppedMax - croppedMin) + croppedMin;      float3 bitangent = float3(1, 0, 0);     float3 normal    = float3(0, 1, 0);     float3 tangent   = float3(0, 0, 1);      float offset = 0.01; \t\t\t     float4 vertexBitangent = getVertex(cropped + float4(bitangent * offset, 0) );     float4 vertex          = getVertex(cropped);     float4 vertexTangent   = getVertex(cropped + float4(tangent   * offset, 0) );      float3 newBitangent = (vertexBitangent - vertex).xyz;     float3 newTangent   = (vertexTangent   - vertex).xyz;      v.normal = cross(newTangent, newBitangent);     v.vertex.y = vertex.y;     v.texcoord = float4(vertexToUV(cropped), 0,0); }<\/code><\/pre>\n<p>  \u0418 \u043d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0448 \u044d\u0444\u0444\u0435\u043a\u0442 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043d.<\/p>\n<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0d9\/b07\/680\/0d9b0768068b2329d53e22a71ff27dfb.gif\" width=\"700\" height=\"272\"><\/div>\n<p>  <\/p>\n<h2>\u041a\u0443\u0434\u0430 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435<\/h2>\n<p>  \u042d\u0442\u043e\u0442 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u043e\u043b\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043a\u043e\u043f\u0438\u0438 <a href=\"http:\/\/experienceperception.com\/black-panther-fui.html#vibraniumsand\" rel=\"noopener\">\u043f\u0435\u0441\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0430<\/a> \u0438\u0437 \u0444\u0438\u043b\u044c\u043c\u0430 \u00ab\u0427\u0451\u0440\u043d\u0430\u044f \u043f\u0430\u043d\u0442\u0435\u0440\u0430\u00bb.<\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/ecS1_-Y_uP8?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u041f\u0430\u043a\u0435\u0442 Unity<\/h3>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0430 <a href=\"https:\/\/www.patreon.com\/posts\/28104018\" rel=\"noopener\">Patreon<\/a>, \u043e\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 \u0430\u0441\u0441\u0435\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430.<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/462153\/\"> https:\/\/habr.com\/ru\/post\/462153\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/511\/6a1\/e02\/5116a1e02debfaa58afe0cddf3b4c6c9.png\" alt=\"image\"><\/div>\n<p>  \u042d\u0442\u043e\u0442 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d <strong>\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043a\u0430\u0440\u0442\u0430\u043c<\/strong> \u0438 \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0432 Unity \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u0438\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0433\u043e\u043b\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043f\u0435\u0441\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0430 \u0438\u0437 \u0444\u0438\u043b\u044c\u043c\u0430 \u00ab\u0427\u0451\u0440\u043d\u0430\u044f \u043f\u0430\u043d\u0442\u0435\u0440\u0430\u00bb.<\/p>\n<p>  \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u0441\u0442\u0430\u043b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <a href=\"https:\/\/twitter.com\/brnkhy\" rel=\"noopener\">Baran Kahyaoglu<\/a> \u0442\u0432\u0438\u0442, \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0434\u043b\u044f <a href=\"https:\/\/twitter.com\/Mapbox\" rel=\"noopener\">Mapbox<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-292970","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=292970"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292970\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=292970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=292970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=292970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}