Created
November 11, 2013 08:21
-
-
Save AGoblinKing/7409677 to your computer and use it in GitHub Desktop.
private glsl
This file contains hidden or 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
precision mediump float; | |
varying vec2 position; | |
uniform sampler2D webcam; | |
float wave(float x, float amount) { | |
return (sin(x * amount) + 1.) * .5; | |
} | |
void main() { | |
vec4 color = texture2D(webcam, position); | |
gl_FragColor.r = wave(color.b, 10.); | |
gl_FragColor.g = wave(color.g, 10.); | |
gl_FragColor.b = wave(color.r, 10.); | |
gl_FragColor.a = 1.; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment