const char glsl_rgb32_dir_cgauss_fsh_src[] =
"\n"
"#pragma optimize (on)\n"
"#pragma debug (off)\n"
"\n"
"uniform sampler2D color_texture;\n"
"uniform vec4      vid_attributes;     // gamma, contrast, brightness\n"
"\n"
"// #define DO_GAMMA  1 // 'pow' is very slow on old hardware, i.e. pre R600 and 'slow' in general\n"
"\n"
"#define KERNEL_SIZE 9\n"
"const int MaxKernelSize = KERNEL_SIZE;\n"
"\n"
"uniform vec2 Offset[MaxKernelSize];\n"
"\n"
"uniform vec4 KernelValue[MaxKernelSize];\n"
"\n"
"void main()\n"
"{\n"
"#ifdef DO_GAMMA\n"
"	vec4 gamma = vec4(1.0 / vid_attributes.r, 1.0 / vid_attributes.r, 1.0 / vid_attributes.r, 0.0);\n"
"#endif\n"
"	vec4 sum   = vec4(0.0);\n"
"	int i;\n"
"\n"
"	// sum it up ..\n"
"	for(i=0; i<KERNEL_SIZE; i++)\n"
"	{\n"
"		sum += texture2D(color_texture, gl_TexCoord[0].st + Offset[i]) * KernelValue[i];\n"
"	}\n"
"\n"
"#ifdef DO_GAMMA\n"
"	// gamma, contrast, brightness equation from: rendutil.h / apply_brightness_contrast_gamma_fp\n"
"	sum = pow( sum, gamma );\n"
"#endif\n"
"\n"
"	// contrast/brightness\n"
"	gl_FragColor = (sum * vid_attributes.g) + vid_attributes.b - 1.0;\n"
"}\n"
"\n"
;
