Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (15 sloc) 726 Bytes
varying vec2 vUv0;
uniform sampler2D source;
uniform vec2 pixelOffset;
void main(void) {
vec4 c = texture2D(source, vUv0);
c = c.a>0.0? c : texture2D(source, vUv0 - pixelOffset);
c = c.a>0.0? c : texture2D(source, vUv0 + vec2(0, -pixelOffset.y));
c = c.a>0.0? c : texture2D(source, vUv0 + vec2(pixelOffset.x, -pixelOffset.y));
c = c.a>0.0? c : texture2D(source, vUv0 + vec2(-pixelOffset.x, 0));
c = c.a>0.0? c : texture2D(source, vUv0 + vec2(pixelOffset.x, 0));
c = c.a>0.0? c : texture2D(source, vUv0 + vec2(-pixelOffset.x, pixelOffset.y));
c = c.a>0.0? c : texture2D(source, vUv0 + vec2(0, pixelOffset.y));
c = c.a>0.0? c : texture2D(source, vUv0 + pixelOffset);
gl_FragColor = c;
}
You can’t perform that action at this time.