// Class: openfl.filters._BlurFilter.BlurShader

var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this

$global.Object.defineProperty(exports, "__esModule", {value: true});

var __map_reserved = {};

// Imports

var $hxClasses = require("./../../../hxClasses_stub").default;
var $import = require("./../../../import_stub").default;
var $extend = require("./../../../extend_stub").default;
function openfl_display_Shader() {return require("./../../../openfl/display/Shader");}

// Constructor

var BlurShader = function() {
	if(this.__glFragmentSource == null) {
		this.__glFragmentSource = "varying float vAlpha;\n\t\tvarying vec2 vTexCoord;\n\t\tuniform sampler2D uImage0;\n\t\t\n\t\tvarying vec2 vBlurCoords[7];\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 sum = vec4(0.0);\n\t\t\tsum += texture2D(uImage0, vBlurCoords[0]) * 0.00443;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[1]) * 0.05399;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[2]) * 0.24197;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[3]) * 0.39894;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[4]) * 0.24197;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[5]) * 0.05399;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[6]) * 0.00443;\n\t\t\t\n\t\t\tgl_FragColor = sum;\n\t\t\t\n\t\t}";
	}
	if(this.__glVertexSource == null) {
		this.__glVertexSource = "attribute float aAlpha;\n\t\tattribute vec4 aPosition;\n\t\tattribute vec2 aTexCoord;\n\t\tvarying float vAlpha;\n\t\tvarying vec2 vTexCoord;\n\t\t\n\t\tuniform mat4 uMatrix;\n\t\t\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vBlurCoords[7];\n\t\tuniform vec2 uTextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvAlpha = aAlpha;\n\t\t\tvTexCoord = aTexCoord;\n\t\t\tgl_Position = uMatrix * aPosition;\n\t\t\t\n\t\t\tvec2 r = uRadius / uTextureSize;\n\t\t\tvBlurCoords[0] = aTexCoord - r * 1.0;\n\t\t\tvBlurCoords[1] = aTexCoord - r * 0.75;\n\t\t\tvBlurCoords[2] = aTexCoord - r * 0.5;\n\t\t\tvBlurCoords[3] = aTexCoord;\n\t\t\tvBlurCoords[4] = aTexCoord + r * 0.5;\n\t\t\tvBlurCoords[5] = aTexCoord + r * 0.75;\n\t\t\tvBlurCoords[6] = aTexCoord + r * 1.0;\n\t\t\t\n\t\t}";
	}
	(openfl_display_Shader().default).call(this);
	this.get_data().uRadius.value = [0,0];
}

// Meta

BlurShader.__name__ = ["openfl","filters","_BlurFilter","BlurShader"];
BlurShader.__super__ = (openfl_display_Shader().default);
BlurShader.prototype = $extend((openfl_display_Shader().default).prototype, {
	__update: function() {
		var tmp = this.get_data().uImage0.input.width;
		this.get_data().uTextureSize.value = [tmp,this.get_data().uImage0.input.height];
		(openfl_display_Shader().default).prototype.__update.call(this);
	}
});
BlurShader.prototype.__class__ = $hxClasses["openfl.filters._BlurFilter.BlurShader"] = BlurShader;

// Init



// Statics




// Export

exports.default = BlurShader;