-
-
Save xseignard/5fe590bf686a883bc7f5 to your computer and use it in GitHub Desktop.
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; | |
void main() { | |
vec2 p = gl_FragCoord.xy / resolution.xy; | |
vec3 a = texture2D(from, p).rgb; | |
vec3 b = texture2D(to, p).rgb; | |
vec3 m = mix(a, b, progress); | |
gl_FragColor = vec4(m, 1.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment