{"id":3105,"date":"2013-10-21T07:45:42","date_gmt":"2013-10-21T05:45:42","guid":{"rendered":"http:\/\/hintz.bplaced.net\/?p=3105"},"modified":"2017-10-06T00:01:04","modified_gmt":"2017-10-05T22:01:04","slug":"hypergrid","status":"publish","type":"post","link":"http:\/\/hintz.bplaced.net\/de\/2013\/webgl\/hypergrid\/","title":{"rendered":"Hypergrid"},"content":{"rendered":"<p>Dieses Muster basiert auf einem hyperbolischem hexagonalem Raster.<\/p>\n<p class=\"webgl\"><img decoding=\"async\" src=\"http:\/\/hintz.bplaced.net\/images\/2013\/10\/hypergrid.jpg\" \/><a href=\"http:\/\/glslsandbox.com\/e#11629.17\"><canvas width=\"620\" height=\"620\"><script type=\"x-shader\/x-vertex\">attribute vec2 position; void main() { gl_Position = vec4(position, 0, 1); }<\/script><script type=\"x-shader\/x-fragment\">\n#ifdef GL_ES\nprecision mediump float;\n#endif\n\/\/ Hypergrid by @hintz 2013-10-20\nuniform float time;\nuniform vec2 mouse;\nuniform vec2 resolution;\n#define PI 3.14159\n#define TWO_PI (PI*2.0)\nvoid main(void) \n{\n\tvec2 v = (gl_FragCoord.xy - resolution *0.5) \/ min(resolution.y,resolution.x) * 10.0;\n\tfloat col = 0.0;\n\tfloat col2 = 0.0;\n\tfor (int i = 0; i < 6; i++) \n\t{\n\t  \tfloat a = 0.2*time + float(i) * (TWO_PI\/6.0);\n\t\tvec2 w;\t\n\t\tw.x = 2.0 + v.x*cos(a) - v.y*sin(a);\n  \t\tw.y = 1.0 + v.y*cos(a) + v.x*sin(a);\n\t\tcol += cos(cos(time)+w.x * (sin(time*0.3)+w.y) + time);\n\t\tcol2 += cos(1.4*sin(time*0.7)-w.x - (cos(time*0.2)-w.y) + 0.6*time);\n\t}\n\t\n\tfloat l = 3.0+2.0*cos(col2);\n\tcol \/= 3.0;\n\tcol = abs(col);\n\tgl_FragColor = vec4(normalize(0.1+vec3(l*col*sin(time*0.83-col), l*col*cos(time*0.93),l*col*sin(col+time*1.03))), 1.0);\n}\n<\/script><\/canvas><\/a><\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Dieses Muster basiert auf einem hyperbolischem hexagonalem Raster.<\/p>\n","protected":false},"author":1,"featured_media":3113,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[144],"tags":[149,147,150,145,189],"_links":{"self":[{"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/posts\/3105"}],"collection":[{"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/comments?post=3105"}],"version-history":[{"count":13,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/posts\/3105\/revisions"}],"predecessor-version":[{"id":3352,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/posts\/3105\/revisions\/3352"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/media\/3113"}],"wp:attachment":[{"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/media?parent=3105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/categories?post=3105"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/tags?post=3105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}