First is the AA Color shader released by Guestr. There are a few options for customizing for performance and saturation, brightness, contrast. This has been tweaked for my specific needs.
const vec3 c_ch = vec3(1.0,1.0,1.0); // rgb color channel intensity
const float a = 1.50 ; // saturation
const float b = 1.00 ; // brightness
const float c = 1.30 ; // contrast
// you can use contrast1,contrast2...contrast4 (or contrast0 for speedup)
float contrast0(float x)
{ return x; }
float contrast1(float x)
{ x = x*1.1547-1.0;
return sign(x)*pow(abs(x),1.0/c)*0.86 + 0.86;}
float contrast2(float x)
{ return normalize(vec2(pow(x,c),pow(0.86,c))).x*1.72;}
float contrast3(float x)
{ return 1.73*pow(0.57735*x,c); }
float contrast4(float x)
{ return clamp(0.866 + c*(x-0.866),0.05, 1.73); }
uniform sampler2D OGL2Texture;
void main()
{
vec3 c10 = texture2D(OGL2Texture, gl_TexCoord[1].xy).xyz;
vec3 c01 = texture2D(OGL2Texture, gl_TexCoord[4].xy).xyz;
vec3 c11 = texture2D(OGL2Texture, gl_TexCoord[0].xy).xyz;
vec3 c21 = texture2D(OGL2Texture, gl_TexCoord[5].xy).xyz;
vec3 c12 = texture2D(OGL2Texture, gl_TexCoord[2].xy).xyz;
vec3 dt = vec3(1.0,1.0,1.0);
float k1=dot(abs(c01-c21),dt);
float k2=dot(abs(c10-c12),dt);
vec3 color = (k1*(c10+c12)+k2*(c01+c21)+0.001*c11)/(2.0*(k1+k2)+0.001);
float x = sqrt(dot(color,color));
color.r = pow(color.r+0.001,a);
color.g = pow(color.g+0.001,a);
color.b = pow(color.b+0.001,a);
gl_FragColor.xyz = contrast4(x)*normalize(color*c_ch)*b;
}
The other is a shader created by Kauto. Adjust the line commented to increase/decrease the result, I don't prefer this one it makes everything look like an oil painting. But what the heck someone might use it...
uniform sampler2D tex00;
uniform float width;
uniform float height;
#define s2(a, b) temp = a; a = min(a, b); b = max(temp, b);
#define mn3(a, b, c) s2(a, b); s2(a, c);
#define mx3(a, b, c) s2(b, c); s2(a, c);
#define mnmx3(a, b, c) mx3(a, b, c); s2(a, b); // 3 exchanges
#define mnmx4(a, b, c, d) s2(a, b); s2(c, d); s2(a, c); s2(b, d); // 4 exchanges
#define mnmx5(a, b, c, d, e) s2(a, b); s2(c, d); mn3(a, c, e); mx3(b, d, e); // 6 exchanges
#define mnmx6(a, b, c, d, e, f) s2(a, d); s2(b, e); s2(c, f); mn3(a, b, c); mx3(d, e, f); // 7 exchanges
vec4 xlat_main( in vec2 tex ) {
// Calculating texel coordinates
float w = 540.0; //Set this value to a lower amount increase effect.
float h = 540.0; //Set this value to a lower amount increase effect.
// vec2 p0 = vec2(1.0/width,1.0/height);
vec2 p1 = vec2(1.0/w,1.0/h);
vec2 p0 = p1*0.6;
vec4 v[9];
//MEDIAN-Filter to round edges
// Add the pixels which make up our window to the pixel array.
for(int dX = -1; dX <= 1; ++dX) {
for(int dY = -1; dY <= 1; ++dY) {
vec2 offset = vec2(float(dX), float(dY));
// If a pixel in the window is located at (x+dX, y+dY), put it at index (dX + R)(2R + 1) + (dY + R) of the
// pixel array. This will fill the pixel array, with the top left pixel of the window at pixel[0] and the
// bottom right pixel of the window at pixel[N-1].
v[(dX + 1) * 3 + (dY + 1)] = texture2D(tex00, tex + offset * p0);
}
}
vec4 temp;
// Starting with a subset of size 6, remove the min and max each time
mnmx6(v[0], v[1], v[2], v[3], v[4], v[5]);
mnmx5(v[1], v[2], v[3], v[4], v[6]);
mnmx4(v[2], v[3], v[4], v[7]);
mnmx3(v[3], v[4], v[8]);
return v[4];
}
void main() {
gl_FragData[0] = xlat_main(gl_TexCoord[0].xy).rgba;
}
Copy ether into a notepad and save them as a .post file. Then place them into your shader directory and tell your driver where to find them. Don't forget to enable.