git-svn-id: svn://db.shs.com.ru/libs@30 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2015-06-25 08:28:11 +00:00
parent ff2939ca76
commit 8b5dca853a
27 changed files with 1062 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
#version 130
uniform sampler2D t0;
uniform vec2 vsize;
void main(void) {
vec2 tc = gl_TexCoord[0].xy;//, dt = 1. / vsize;
vec3 dc0 = texture2D(t0, tc).rgb, dc1 = textureOffset(t0, tc, ivec2(1, 0)).rgb, dc2 = textureOffset(t0, tc, ivec2(0, 1)).rgb, dc3 = textureOffset(t0, tc, ivec2(1, 1)).rgb;
gl_FragColor.rgb = vec3(max(max(max(dc0.r, dc1.r), dc2.r), dc3.r), min(min(min(dc0.g, dc1.g), dc2.g), dc3.g), (dc0.b + dc1.b + dc2.b + dc3.b) / 4.);
}