Skip to content

Instantly share code, notes, and snippets.

@gre
Forked from gre/TEMPLATE.glsl
Created January 24, 2014 21:12
Show Gist options
  • Save gre/8606554 to your computer and use it in GitHub Desktop.
Save gre/8606554 to your computer and use it in GitHub Desktop.
Simple fade transition
#ifdef GL_ES
precision highp float;
#endif
uniform vec2 resolution;
uniform float progress;
uniform sampler2D from, to;
void main() {
vec2 p = gl_FragCoord.xy / resolution.xy;
gl_FragColor = mix(texture2D(from, p), texture2D(to, p), progress);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment