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