2010-05-11 22:05:00 +00:00
|
|
|
uniform sampler2D texUnit;
|
|
|
|
uniform vec2 offsets[25];
|
|
|
|
uniform vec4 kernel[25];
|
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
vec4 sum = texture2D(texUnit, gl_TexCoord[0].st) * kernel[0];
|
2010-09-13 22:03:21 +00:00
|
|
|
for (int i = 1; i < 25; i++) {
|
2010-05-11 22:05:00 +00:00
|
|
|
sum += texture2D(texUnit, gl_TexCoord[0].st - offsets[i]) * kernel[i];
|
|
|
|
sum += texture2D(texUnit, gl_TexCoord[0].st + offsets[i]) * kernel[i];
|
|
|
|
}
|
|
|
|
gl_FragColor = sum;
|
|
|
|
}
|
|
|
|
|