2 const int KernelSize = 9;
5 uniform vec2 Offset[KernelSize];
7 uniform vec4 KernelValue[KernelSize];
8 uniform sampler2D srcTex;
9 uniform vec4 ScaleFactor;
10 uniform vec4 BaseColor;
16 for (i = 0; i < KernelSize; ++i) {
17 vec4 tmp = texture2D(srcTex, gl_TexCoord[0].st + Offset[i]);
18 sum += tmp * KernelValue[i];
20 gl_FragColor = sum * ScaleFactor + BaseColor;