2016-06-14 11:11:37 +00:00
|
|
|
#version 150
|
2016-04-28 20:07:05 +00:00
|
|
|
uniform sampler2D image;
|
|
|
|
uniform sampler2D previousImage;
|
|
|
|
uniform bool uMixPrevious;
|
|
|
|
|
|
|
|
uniform vec2 uResolution;
|
|
|
|
const vec2 textureDimensions = vec2(160, 144);
|
|
|
|
|
2016-06-14 11:11:37 +00:00
|
|
|
out vec4 frag_color;
|
|
|
|
|
2016-06-08 21:06:55 +00:00
|
|
|
#line 1
|
2016-04-28 20:07:05 +00:00
|
|
|
{filter}
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
if (uMixPrevious) {
|
2016-06-14 11:11:37 +00:00
|
|
|
frag_color = mix(scale(image), scale(previousImage), 0.5);
|
2016-04-28 20:07:05 +00:00
|
|
|
}
|
|
|
|
else {
|
2016-06-14 11:11:37 +00:00
|
|
|
frag_color = scale(image);
|
2016-04-28 20:07:05 +00:00
|
|
|
}
|
|
|
|
}
|