{"version":3,"file":"pixi-filters.js","sources":["../../filters/adjustment/lib/filter-adjustment.esm.js","../../filters/kawase-blur/lib/filter-kawase-blur.esm.js","../../filters/advanced-bloom/lib/filter-advanced-bloom.esm.js","../../filters/ascii/lib/filter-ascii.esm.js","../../filters/bevel/lib/filter-bevel.esm.js","../../filters/bloom/lib/filter-bloom.esm.js","../../filters/bulge-pinch/lib/filter-bulge-pinch.esm.js","../../filters/color-map/lib/filter-color-map.esm.js","../../filters/color-replace/lib/filter-color-replace.esm.js","../../filters/convolution/lib/filter-convolution.esm.js","../../filters/cross-hatch/lib/filter-cross-hatch.esm.js","../../filters/crt/lib/filter-crt.esm.js","../../filters/dot/lib/filter-dot.esm.js","../../filters/drop-shadow/lib/filter-drop-shadow.esm.js","../../filters/emboss/lib/filter-emboss.esm.js","../../filters/glitch/lib/filter-glitch.esm.js","../../filters/glow/lib/filter-glow.esm.js","../../filters/godray/lib/filter-godray.esm.js","../../filters/motion-blur/lib/filter-motion-blur.esm.js","../../filters/multi-color-replace/lib/filter-multi-color-replace.esm.js","../../filters/old-film/lib/filter-old-film.esm.js","../../filters/outline/lib/filter-outline.esm.js","../../filters/pixelate/lib/filter-pixelate.esm.js","../../filters/radial-blur/lib/filter-radial-blur.esm.js","../../filters/reflection/lib/filter-reflection.esm.js","../../filters/rgb-split/lib/filter-rgb-split.esm.js","../../filters/shockwave/lib/filter-shockwave.esm.js","../../filters/simple-lightmap/lib/filter-simple-lightmap.esm.js","../../filters/tilt-shift/lib/filter-tilt-shift.esm.js","../../filters/twist/lib/filter-twist.esm.js","../../filters/zoom-blur/lib/filter-zoom-blur.esm.js"],"sourcesContent":["/*!\n * @pixi/filter-adjustment - v2.7.0\n * Compiled Sun, 13 Jan 2019 22:51:52 UTC\n *\n * @pixi/filter-adjustment is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport{Filter as r}from\"pixi.js\";var t=\"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\",n=\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform float gamma;\\nuniform float contrast;\\nuniform float saturation;\\nuniform float brightness;\\nuniform float red;\\nuniform float green;\\nuniform float blue;\\nuniform float alpha;\\n\\nvoid main(void)\\n{\\n vec4 c = texture2D(uSampler, vTextureCoord);\\n\\n if (c.a > 0.0) {\\n c.rgb /= c.a;\\n\\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\\n rgb.r *= red;\\n rgb.g *= green;\\n rgb.b *= blue;\\n c.rgb = rgb * brightness;\\n\\n c.rgb *= c.a;\\n }\\n\\n gl_FragColor = c * alpha;\\n}\\n\",o=function(r){function o(o){r.call(this,t,n),Object.assign(this,{gamma:1,saturation:1,contrast:1,brightness:1,red:1,green:1,blue:1,alpha:1},o)}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.apply=function(r,t,n,o){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,r.applyFilter(this,t,n,o)},o}(r);export{o as AdjustmentFilter};\n//# sourceMappingURL=filter-adjustment.esm.js.map\n","/*!\n * @pixi/filter-kawase-blur - v2.7.0\n * Compiled Sun, 13 Jan 2019 22:51:52 UTC\n *\n * @pixi/filter-kawase-blur is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport{Point as e,Filter as t}from\"pixi.js\";var r=\"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\",i=\"\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 uOffset;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample top right pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample bottom right pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Sample bottom left pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Average\\n color *= 0.25;\\n\\n gl_FragColor = color;\\n}\",o=\"\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 uOffset;\\nuniform vec4 filterClamp;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample top right pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample bottom right pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample bottom left pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Average\\n color *= 0.25;\\n\\n gl_FragColor = color;\\n}\\n\",n=function(t){function n(n,l,u){void 0===n&&(n=4),void 0===l&&(l=3),void 0===u&&(u=!1),t.call(this,r,u?o:i),this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new e,this.pixelSize=1,this._clamp=u,this._kernels=null,Array.isArray(n)?this.kernels=n:(this._blur=n,this.quality=l)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var l={kernels:{configurable:!0},clamp:{configurable:!0},pixelSize:{configurable:!0},quality:{configurable:!0},blur:{configurable:!0}};return n.prototype.apply=function(e,t,r,i){var o,n=this.pixelSize.x/t.size.width,l=this.pixelSize.y/t.size.height;if(1===this._quality||0===this._blur)o=this._kernels[0]+.5,this.uniforms.uOffset[0]=o*n,this.uniforms.uOffset[1]=o*l,e.applyFilter(this,t,r,i);else{for(var u,s=e.getRenderTarget(!0),a=t,f=s,p=this._quality-1,x=0;x
0)for(var i=e,o=e/t,n=1;n