Add minecraft.glsl
This commit is contained in:
parent
07eaf69b2c
commit
3ccf26ebc0
1 changed files with 26 additions and 0 deletions
26
minecraft.glsl
Normal file
26
minecraft.glsl
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
// extra changes by @xprogram
|
||||||
|
|
||||||
|
#ifdef GL_ES
|
||||||
|
precision mediump float;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uniform float time;
|
||||||
|
uniform vec2 resolution;
|
||||||
|
|
||||||
|
void main( void ) {
|
||||||
|
|
||||||
|
vec3 d = normalize(vec3((gl_FragCoord.xy - resolution.xy * .5) / resolution.x, .5));
|
||||||
|
vec3 p, c, f, g=d, o, y=vec3(1.0,3.0,0.0);
|
||||||
|
o.y = 1.2*cos((o.x=0.3)*(o.z=time * 10.0));
|
||||||
|
o.x -= sin(time) + 3.0;
|
||||||
|
|
||||||
|
for( float i=.0; i<11.; i+=.05 ) {
|
||||||
|
f = fract(c = o += d*i*.05);
|
||||||
|
p = floor( c )*.4;
|
||||||
|
if( cos(p.z) + sin(p.x) > ++p.y ) {
|
||||||
|
g = (f.y-.04*cos((c.x+c.z)*10.)>.7?y:f.x*y.yxz) / i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gl_FragColor = vec4(g,1.0);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue