mkxp-z/shader/transSimple.frag

17 lines
377 B
GLSL

/* Fragment shader that produces a simple
* fade in / fade out type transition */
uniform sampler2D frozenScene;
uniform sampler2D currentScene;
uniform float prog;
in vec2 v_texCoord;
out vec4 fragColor;
void main() {
vec4 newPixel = texture(currentScene, v_texCoord);
vec4 oldPixel = texture(frozenScene, v_texCoord);
fragColor = mix(oldPixel, newPixel, prog);
}