mkxp/shader/transSimple.frag

17 lines
374 B
GLSL
Raw Permalink Normal View History

/* Fragment shader that produces a simple
* fade in / fade out type transition */
2013-09-01 14:27:21 +00:00
uniform sampler2D frozenScene;
uniform sampler2D currentScene;
uniform float prog;
varying vec2 v_texCoord;
2013-09-01 14:27:21 +00:00
void main()
{
vec4 newPixel = texture2D(currentScene, v_texCoord);
vec4 oldPixel = texture2D(frozenScene, v_texCoord);
2013-09-01 14:27:21 +00:00
gl_FragColor = mix(oldPixel, newPixel, prog);
}