Newer
Older
pixi.js / src / filters / blur / blurDir.frag
@spaceribs spaceribs on 12 Apr 2015 516 bytes first draft of the gaussian blur fix
precision lowp float;

varying vec2 vTextureCoord;
varying vec2 vBlurTexCoords[3];
varying vec4 vColor;

uniform sampler2D uSampler;

void main(void)
{
    gl_FragColor = vec4(0.0);

    gl_FragColor += texture2D(uSampler, vTextureCoord     ) * 0.3989422804014327;
    gl_FragColor += texture2D(uSampler, vBlurTexCoords[ 0]) * 0.2419707245191454;
    gl_FragColor += texture2D(uSampler, vBlurTexCoords[ 1]) * 0.05399096651318985;
    gl_FragColor += texture2D(uSampler, vBlurTexCoords[ 2]) * 0.004431848411938341;
}