scene.org File Archive

File download

<root>­/­parties­/­2016­/­tokyodemofest16­/­glsl_graphics_compo/4linerayma.txt

File size:
304 bytes (304B)
File date:
2016-02-24 05:45:01
Download count:
all-time: 512

Preview

#ifdef GL_ES
precision highp float;
#endif
uniform float time;uniform vec2 resolution;void main(void){float t=.0;vec2 u=(
gl_FragCoord.xy/resolution)*2.-1.;vec3 d=normalize(vec3(u,1));vec3 p=vec3(0,0,
time);for(int i=0;i<50;i++)t+=length(mod(p+d*t,2.)-1.)-.1;gl_FragColor.xyz=vec3(
(t*.1)*d*.5);}