Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (14 sloc) 0.483 kb
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect src, srcBlur, dstBlur;
void main() {
vec2 pos = gl_TexCoord[0].st;
vec4 srcColorBlur = texture2DRect(srcBlur, pos);
if(srcColorBlur.r > 0.) { // don't copy anything black
vec3 srcColor = texture2DRect(src, pos).rgb;
vec4 dstColorBlur = texture2DRect(dstBlur, pos);
vec3 offset = (dstColorBlur.rgb - srcColorBlur.rgb);
gl_FragColor = vec4(srcColor + offset, 1.);
} else {
gl_FragColor = vec4(0.);
}
}
Jump to Line
Something went wrong with that request. Please try again.