Last active
August 29, 2015 14:22
-
-
Save veeneck/8181776f76a112dce239 to your computer and use it in GitHub Desktop.
Shadertoy: Bullseye
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
// https://www.shadertoy.com/view/Xtl3Dj | |
void main() { | |
vec4 val = texture2D(u_texture, v_tex_coord); | |
vec4 grad = texture2D(u_gradient, v_tex_coord); | |
if (val.a < 0.1 && grad.r < 1.0 && grad.a > 0.8) { | |
vec2 uv = gl_FragCoord.xy / u_sprite_size.xy*2.0-1.0; | |
float len = sin(16.*length(uv)-u_time*4.)*0.5+0.5 ; | |
vec3 col = vec3(len)*vec3(0.,0.98,.0); | |
gl_FragColor = vec4(col,1); | |
} else { | |
gl_FragColor = val; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment