{"id":2983,"date":"2013-05-03T00:13:28","date_gmt":"2013-05-02T22:13:28","guid":{"rendered":"http:\/\/hintz.bplaced.net\/?p=2983"},"modified":"2015-03-16T01:32:56","modified_gmt":"2015-03-16T00:32:56","slug":"leadlight","status":"publish","type":"post","link":"http:\/\/hintz.bplaced.net\/en\/2013\/webgl\/leadlight\/","title":{"rendered":"Leadlight"},"content":{"rendered":"<p>This animation is similar to a window ornament made of colored glass tiles.<\/p>\n<p class=\"webgl\"><img decoding=\"async\" src=\"http:\/\/hintz.bplaced.net\/images\/2013\/05\/leadlight.jpg\" \/><a href=\"http:\/\/glslsandbox.com\/e#8456.1\"><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\nuniform float time;\nuniform vec2 resolution;\n\/\/ Leadlight by @hintz 2013-05-02\nvoid main()\n{\n\tvec2 position = (gl_FragCoord.xy - 0.5*resolution) \/ resolution.xx ;\n\tfloat r = length(position);\n\tfloat a = atan(position.y, position.x);\n\tfloat t = time + 100.0\/(r+1.0);\t\n\tfloat light = 15.0*abs(0.05*(sin(t)+sin(time+a*8.0)));\n\tvec3 color = vec3(-sin(r*5.0-a-time+sin(r+t)), sin(r*3.0+a-time+sin(r+t)), cos(r+a*2.0+a+time)-sin(r+t));\n\tgl_FragColor = vec4((normalize(color)+0.9) * light , 1.0);\n}\n<\/script><\/canvas><\/a><\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This animation is similar to a window ornament made of colored glass tiles.<\/p>\n","protected":false},"author":1,"featured_media":2999,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[144],"tags":[149,147,150,131,189],"_links":{"self":[{"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/posts\/2983"}],"collection":[{"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/comments?post=2983"}],"version-history":[{"count":13,"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/posts\/2983\/revisions"}],"predecessor-version":[{"id":3188,"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/posts\/2983\/revisions\/3188"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/media\/2999"}],"wp:attachment":[{"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/media?parent=2983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/categories?post=2983"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hintz.bplaced.net\/en\/wp-json\/wp\/v2\/tags?post=2983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}