{"id":330798,"date":"2022-03-17T21:00:23","date_gmt":"2022-03-17T21:00:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=330798"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=330798","title":{"rendered":"<span>\u0424\u0443\u0442\u0431\u043e\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0432 30 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ec6\/c8d\/fb7\/ec6c8dfb7c6014ccc85ffeeb1eda82b4.png\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ec6\/c8d\/fb7\/ec6c8dfb7c6014ccc85ffeeb1eda82b4.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u044f \u0443\u0432\u043b\u0435\u043a\u0430\u044e\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044d\u0442\u043e \u043c\u0438\u043d\u0438-\u0444\u0443\u0442\u0431\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f <a href=\"https:\/\/www.shadertoy.com\/view\/7tlyzH\" rel=\"noopener noreferrer nofollow\">\u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f<\/a>.<\/p>\n<pre><code>#define W 5 #define rot(a) mat2(cos(a),sin(a),-sin(a),cos(a)) #define m(v2,deg) mod((v2)*rot(radians(deg)),60.0)-30.0 #define hex() o1=m(o,0.);o2=m(o,60.);o3=m(o,120.);rgba+=clamp(vec4(abs(o1.y)+abs(o2.y)+abs(o3.y)-54.),0.1,1.0);  void mainImage(out vec4 rgba,in vec2 o){     rgba=vec4(0.33,1.0,0.5,1);     vec2 R=iResolution.xy,iM=((length(iMouse.z)>=1.0)?vec2(iMouse.x,iMouse.y)*1.0:R\/2.0)*min(R.x,R.y)\/360.0;     o-=R\/2.;vec2 a=o,M=o,field=o;o\/=min(R.x,R.y)\/360.0;;field\/=min(R.x,R.y)\/360.0;     vec2 o1,o2,o3;float iT=iTime;     o-=(-iM\/min(R.x,R.y)*360.0+R\/2.0)\/min(R.x,R.y)*360.0*(vec2(sign(cos(iT\/3.14))*cos(iT\/3.14)*cos(iT\/3.14),sin(iT\/1.57)));     o\/=(abs(cos(radians(iTime*180.0)))+0.5)\/1.5;     float scale=7.0,x=o.x\/scale,y=o.y\/scale,     z=sqrt(x*x+y*y)\/scale;o\/=cos(z);     \/\/field     ivec4 f=ivec4(int(abs(field.x))\/W,int(abs(field.y))\/W,int((abs(field.x)-0.499)\/float(W)*2.0),int(length(field)\/float(W)));     if(((f.x-10*W)*(f.y-5*W)==0||f.x>=8*W&amp;&amp;f.y==2*W||f.x==8*W&amp;&amp;f.y&lt;=2*W||(f.z)==0)&amp;&amp;(f.y&lt;=5*W&amp;&amp;f.x&lt;=10*W)||f.w==2*W)       rgba=vec4(2.0,2.2,2.0,1);     if(z&lt;1.0){\/\/ball       rgba=vec4(0,0,0,1);       o+=vec2(cos(iTime\/1.0)*90.0,-sin(iTime\/1.0)*90.0);hex();o.y+=40.;hex();       rgba*=(pow(1.0-cos(z),2.0)+3.\/4.0);       if(rgba.x&lt;=0.5)rgba*=pow(cos(z),-2.0)\/2.0;     }else{\/\/grass       rgba*=(cos(length(mod(a,R\/10.5))*length(mod(a,R\/10.5))*5.0)+2.0)\/3.0;       if(-length(M+R\/2.-iM\/min(R.x,R.y)*360.0)>=-16.*min(R.x,R.y)\/360.0){\/\/Player        rgba=clamp(rgba,0.0,1.0)*0.5;       }if(z&lt;2.){\/\/shadow        rgba=clamp(rgba,0.0,1.0)+clamp((z-1.1)\/((abs(cos(radians(iTime*180.0)))+0.5)\/1.5),-1.0,0.0); }   } }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043a\u043e\u0434\u0443, \u0442\u043e &#171;o&#187; &#8212; \u044d\u0442\u043e \u043c\u044f\u0447, &#171;a&#187; &#8212; \u044d\u0442\u043e \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0437\u043e\u043d, &#171;f&#187; &#8212; \u044d\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u043f\u043e\u043b\u044f. \u041c\u044f\u0447 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438 \u0441\u0435\u0431\u044f \u0441\u0435\u0442\u043a\u0443 \u0438\u0437 \u0448\u0435\u0441\u0442\u0438\u0433\u0440\u0430\u043d\u043d\u0438\u043a\u043e\u0432, \u043e\u0431\u044a\u0435\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0434\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438: <code>z=sqrt(x*x+y*y)\/scale;o\/=cos(z);<\/code><\/p>\n<p>\u042f \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0440\u0430\u0436\u0430\u044e\u0441\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u043a\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e glsl \u0438 shadertoy. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0438\u0437 \u043c\u043e\u0435\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0441\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443 \u0440\u0435\u043c\u0435\u0441\u043b\u0443 \ud83d\ude42<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><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\/656233\/\"> https:\/\/habr.com\/ru\/post\/656233\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u044f \u0443\u0432\u043b\u0435\u043a\u0430\u044e\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044d\u0442\u043e \u043c\u0438\u043d\u0438-\u0444\u0443\u0442\u0431\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f <a href=\"https:\/\/www.shadertoy.com\/view\/7tlyzH\" rel=\"noopener noreferrer nofollow\">\u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f<\/a>.<\/p>\n<pre><code>#define W 5 #define rot(a) mat2(cos(a),sin(a),-sin(a),cos(a)) #define m(v2,deg) mod((v2)*rot(radians(deg)),60.0)-30.0 #define hex() o1=m(o,0.);o2=m(o,60.);o3=m(o,120.);rgba+=clamp(vec4(abs(o1.y)+abs(o2.y)+abs(o3.y)-54.),0.1,1.0);  void mainImage(out vec4 rgba,in vec2 o){     rgba=vec4(0.33,1.0,0.5,1);     vec2 R=iResolution.xy,iM=((length(iMouse.z)>=1.0)?vec2(iMouse.x,iMouse.y)*1.0:R\/2.0)*min(R.x,R.y)\/360.0;     o-=R\/2.;vec2 a=o,M=o,field=o;o\/=min(R.x,R.y)\/360.0;;field\/=min(R.x,R.y)\/360.0;     vec2 o1,o2,o3;float iT=iTime;     o-=(-iM\/min(R.x,R.y)*360.0+R\/2.0)\/min(R.x,R.y)*360.0*(vec2(sign(cos(iT\/3.14))*cos(iT\/3.14)*cos(iT\/3.14),sin(iT\/1.57)));     o\/=(abs(cos(radians(iTime*180.0)))+0.5)\/1.5;     float scale=7.0,x=o.x\/scale,y=o.y\/scale,     z=sqrt(x*x+y*y)\/scale;o\/=cos(z);     \/\/field     ivec4 f=ivec4(int(abs(field.x))\/W,int(abs(field.y))\/W,int((abs(field.x)-0.499)\/float(W)*2.0),int(length(field)\/float(W)));     if(((f.x-10*W)*(f.y-5*W)==0||f.x>=8*W&amp;&amp;f.y==2*W||f.x==8*W&amp;&amp;f.y&lt;=2*W||(f.z)==0)&amp;&amp;(f.y&lt;=5*W&amp;&amp;f.x&lt;=10*W)||f.w==2*W)       rgba=vec4(2.0,2.2,2.0,1);     if(z&lt;1.0){\/\/ball       rgba=vec4(0,0,0,1);       o+=vec2(cos(iTime\/1.0)*90.0,-sin(iTime\/1.0)*90.0);hex();o.y+=40.;hex();       rgba*=(pow(1.0-cos(z),2.0)+3.\/4.0);       if(rgba.x&lt;=0.5)rgba*=pow(cos(z),-2.0)\/2.0;     }else{\/\/grass       rgba*=(cos(length(mod(a,R\/10.5))*length(mod(a,R\/10.5))*5.0)+2.0)\/3.0;       if(-length(M+R\/2.-iM\/min(R.x,R.y)*360.0)>=-16.*min(R.x,R.y)\/360.0){\/\/Player        rgba=clamp(rgba,0.0,1.0)*0.5;       }if(z&lt;2.){\/\/shadow        rgba=clamp(rgba,0.0,1.0)+clamp((z-1.1)\/((abs(cos(radians(iTime*180.0)))+0.5)\/1.5),-1.0,0.0); }   } }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043a\u043e\u0434\u0443, \u0442\u043e &#171;o&#187; &#8212; \u044d\u0442\u043e \u043c\u044f\u0447, &#171;a&#187; &#8212; \u044d\u0442\u043e \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0437\u043e\u043d, &#171;f&#187; &#8212; \u044d\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u043f\u043e\u043b\u044f. \u041c\u044f\u0447 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438 \u0441\u0435\u0431\u044f \u0441\u0435\u0442\u043a\u0443 \u0438\u0437 \u0448\u0435\u0441\u0442\u0438\u0433\u0440\u0430\u043d\u043d\u0438\u043a\u043e\u0432, \u043e\u0431\u044a\u0435\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0434\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438: <code>z=sqrt(x*x+y*y)\/scale;o\/=cos(z);<\/code><\/p>\n<p>\u042f \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0440\u0430\u0436\u0430\u044e\u0441\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u043a\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e glsl \u0438 shadertoy. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0438\u0437 \u043c\u043e\u0435\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0441\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443 \u0440\u0435\u043c\u0435\u0441\u043b\u0443 \ud83d\ude42<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><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\/656233\/\"> https:\/\/habr.com\/ru\/post\/656233\/<\/a><br \/><\/br><\/br><\/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-330798","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330798","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=330798"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330798\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}