mkxp-z/shader/transSimple.frag

18 lines
377 B
GLSL
Raw Normal View History

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