Created
October 2, 2018 20:06
-
-
Save molotovbliss/eb5871de8dbc32dc9d1e2f1cafe1d924 to your computer and use it in GitHub Desktop.
a Readable Space Invader Shader from shadertoy.com/view/ldcXD2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Formatted for human reading: Space invader shader | |
// sauce: https://www.shadertoy.com/view/ldcXD2 | |
void mainImage(out vec4 o, vec2 d) { | |
float t = iTime; | |
o += 1. - o + fract( | |
.3 * t); | |
d *= .03; | |
for (int i = 0, y; i | |
++ < 5;) o *= 1. > mod(((y = int(mod( | |
t - d.y / o, 14.))) > 3 ? 35552534e8 : 56869384.) / exp2( | |
float(y * 7 + int(abs(mod(d.x / o - 7. * cos(t), 14.) - 7.)))), 2.) ? .5 : 1.; | |
o.z *= 2.; | |
} | |
// ORIGINAL: | |
// Created by Sebastien Durand - 2018 | |
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. | |
//// //// | |
//// //// | |
//// //// | |
void //// | |
mainImage(out vec4 o,vec2 d){ | |
float t=iTime; o+=1.-o+fract( | |
.3*t); d *=.03;for(int i=0 ,y;i | |
++<5;) o *=1.>mod(((y= int(mod( | |
t-d.y/o,14.)))>3? 35552534e8:56869384.)/exp2( | |
float(y*7+int(abs(mod(d.x/o-7.*cos(t),14.)-7. | |
)))) ,2.)?.5:1.;o.z*=2.;}///////// //// | |
//// ///////////////////////////// //// | |
//// //// //// //// | |
//// //// //// //// | |
//////// //////// | |
//////// //////// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment