{"id":3010,"date":"2013-05-06T11:48:09","date_gmt":"2013-05-06T09:48:09","guid":{"rendered":"http:\/\/hintz.bplaced.net\/?p=3010"},"modified":"2015-03-16T01:32:21","modified_gmt":"2015-03-16T00:32:21","slug":"psychedelic","status":"publish","type":"post","link":"http:\/\/hintz.bplaced.net\/de\/2013\/webgl\/psychedelic\/","title":{"rendered":"Psychedelisch"},"content":{"rendered":"<p>Dies ist eine psychedelische Animation, die ich vor einer Weile gemacht habe.<\/p>\n<p class=\"webgl\"><img decoding=\"async\" src=\"http:\/\/hintz.bplaced.net\/images\/2013\/05\/psychedelic.jpg\" \/><a href=\"http:\/\/glslsandbox.com\/e#6544.3\"><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\/\/ rotwang: @mod* little variation\n\/\/ modified by @hintz\n#ifdef GL_ES\nprecision mediump float;\n#endif\nuniform float time;\nuniform vec2 resolution;\nvoid main(void)\n{\n\tfloat speed = time*0.25;\n\tvec2 position = ( (gl_FragCoord.xy - resolution.xy*0.5) \/ resolution.x );\n\tvec2 center1 = vec2(cos(speed), cos(speed*0.535));\n\tvec2 center2 = vec2(cos(speed*0.259), cos(speed*0.605));\n\tvec2 center3 = vec2(cos(speed*0.346), cos(speed*0.263));\n\tvec2 center4 = vec2(cos(speed*0.1346), cos(speed*0.1263));\n\tfloat size = 32.0; \/\/(sin(time*0.1)+1.2)*90.0;\n\tfloat d = distance(position, center1)*size;\n\tvec2 color = vec2(cos(d),sin(d));\n\td = distance(position, center2)*size;\n\tcolor += vec2(cos(d),sin(d));\n\td = distance(position, center3)*size;\n\tcolor += vec2(cos(d),sin(d));\n\td = distance(position, center4)*size;\n\tcolor += vec2(cos(d),sin(d));\n\tvec2 ncolor = normalize(color);\t\n\tvec3 clr = vec3(ncolor.x,ncolor.y,-ncolor.x-ncolor.y);\n\tclr *= sqrt(color.x*color.x+color.y*color.y)*0.25;\n\tgl_FragColor = vec4(cos(clr*3.0+0.5)+sin(clr*2.0), 1.0 );\n}\n<\/script><\/canvas><\/a><\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Dies ist eine psychedelische Animation, die ich vor einer Weile gemacht habe.<\/p>\n","protected":false},"author":1,"featured_media":3017,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[144],"tags":[149,147,189],"_links":{"self":[{"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/posts\/3010"}],"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=3010"}],"version-history":[{"count":13,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/posts\/3010\/revisions"}],"predecessor-version":[{"id":3187,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/posts\/3010\/revisions\/3187"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/media\/3017"}],"wp:attachment":[{"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/media?parent=3010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/categories?post=3010"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hintz.bplaced.net\/de\/wp-json\/wp\/v2\/tags?post=3010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}