2013-09-23 05:15:01 +00:00
|
|
|
/* 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;
|
|
|
|
|
2013-09-23 05:15:01 +00:00
|
|
|
varying vec2 v_texCoord;
|
|
|
|
|
2013-09-01 14:27:21 +00:00
|
|
|
void main()
|
|
|
|
{
|
2013-09-23 05:15:01 +00:00
|
|
|
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);
|
|
|
|
}
|