{"id":3245,"date":"2016-07-05T23:55:34","date_gmt":"2016-07-05T21:55:34","guid":{"rendered":"http:\/\/hintz.bplaced.net\/en\/?p=3245"},"modified":"2016-07-09T01:04:24","modified_gmt":"2016-07-08T23:04:24","slug":"glassbricks","status":"publish","type":"post","link":"http:\/\/hintz.bplaced.net\/de\/2016\/webgl\/glass-bricks\/","title":{"rendered":"Glass Bricks"},"content":{"rendered":"<p class=\"webgl\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/hintz.bplaced.net\/images\/2016\/07\/GlassBricks.jpg\" width=\"620\" height=\"620\" \/><a href=\"http:\/\/glslsandbox.com\/e#33914.30\"><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\/\/ Glass Bricks\n\/\/ modified by @hintz 2016-07-05\nuniform float time;\nuniform vec2 mouse;\nuniform vec2 resolution;\nfloat t = time;\nfloat sens = 0.25;\nfloat vel = 0.01;\nfloat pi = 3.14159265359;\nvoid main(void)\n{\n\tvec2 pos = ((gl_FragCoord.xy - 0.5 * resolution) \/ resolution.y);\n\tfloat n = pi * 8.0 * (1.0 + cos(0.231 * t));\n\tfloat m = pi * 7.0 * (1.0 + sin(0.2 * t));\n\tfloat z = abs(cos(n * pos.x) * cos(m * pos.y) + cos(n * pos.y) * cos(m * pos.x));\t\n\tfloat c0 = 1.1 - pow(z, sens * 4.0) + 0.3 * cos(3.1 * pos.x + t * 0.99);\n\tfloat c1 = 1.1 - pow(z, sens * 1.0) + 0.3 * sin(2.9 * pos.y + t * 1.02);\n\tfloat c2 = c0 * sin(3.05 * pos.y + t) + c1 * cos(3.0 * pos.x + t);\t\t\n\tgl_FragColor = vec4(c0 + c1 * sin(t * 0.7), c1 + c2 * sin(t * 0.61), c2 + c0 * sin(t * 0.54), 1.0);\n}\n<\/script><\/canvas><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":3251,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[144],"tags":[189],"_links":{"self":[{"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/posts\/3245"}],"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=3245"}],"version-history":[{"count":9,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/posts\/3245\/revisions"}],"predecessor-version":[{"id":3257,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/posts\/3245\/revisions\/3257"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/media\/3251"}],"wp:attachment":[{"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/media?parent=3245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/categories?post=3245"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/tags?post=3245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}