We are about to switch to a new forum software. Until then we have removed the registration on this forum.
String[]vS={"#version 150"
,"in vec4 position;"
,"void main(){"
,"gl_Position=vec4(position.xy*.5-1.,0.,1.);"
,"}"
};
String[]fS={"#version 150"
,"out vec4 m;"
,"uniform vec2 res;"
,"uniform float t;"
,"void main(){"
,"vec2 p=(gl_FragCoord.xy-.5*res)/res.y;"
,"float it=.2/sqrt(dot(p, p)),"
,"i=float(fract(1./it+t)>=.02/fract(it+sin(t))),"
,"l=float(.5<fract(it+sin(t*1.)+atan(p.x, p.y)*3.));"
,"m=vec4(i<l||it<.05);"
,"}"
};
PShader shdr;
void setup(){
size(620,349,P2D);
shdr=new PShader(this,vS,fS);
shdr.set("res",float(width),float(height));
}
void draw(){
shdr.set("t",millis()/1000.0);
filter(shdr);
}
Comments
Okaayy... But what exactly is this supposed to be? This isn't a question, so I presume that you are announcing that you have created a tunnel shader?
Thanks for sharing. It looks pretty cool
Kf
@Lord_of_the_Galaxy -- it is in the Share Your Work forum category, so ...
...thanks for sharing!
@nabr -- Interesting use of specifying the PShader entirely in a string -- and fascinating pulsing effects.
@Lord_of_the_Galaxy idk ftw
@kfrajer based on: http://glslsandbox.com/e#39712.0
@jeremydouglass thank you for comment!
Ok, I see. Good job.