The prototype of Zen Zoom. Made on ubuntu, I guess.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
|
|
|
|
|
|
uniform sampler2D tex;
|
|
|
|
|
|
|
|
uniform vec4 background_color;
|
|
|
|
uniform mat4 color_transformation;
|
|
|
|
|
|
|
|
void main( void ) {
|
|
|
|
vec4 orig = texture2D(tex, gl_TexCoord[0].st);
|
|
|
|
|
|
|
|
|
|
|
|
gl_FragColor = background_color + color_transformation * orig;
|
|
|
|
|
|
|
|
{ // shine
|
|
|
|
vec2 offset = vec2(0.01, 0.0);
|
|
|
|
|
|
|
|
vec4 a = texture2D(tex, gl_TexCoord[0].st - offset);
|
|
|
|
vec4 b = texture2D(tex, gl_TexCoord[0].st + offset);
|
|
|
|
|
|
|
|
if(length(a-b) < 0.1 && length(orig.rgb) > 0.3)
|
|
|
|
gl_FragColor *= 1.0 + 0.01/length(a-b);
|
|
|
|
}
|
|
|
|
|
|
|
|
gl_FragColor.a = 1.0;
|
|
|
|
}
|