Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- varying highp vec2 texCoord;
- const highp vec4 een = vec4(1.0, 1.0, 1.0, 1.0);
- const highp vec2 offset1 = vec2(-0.2, -0.2);
- const highp vec2 offset2 = vec2(-0.2, 0.2);
- const highp vec2 offset3 = vec2( 0.2, -0.2);
- const highp vec2 offset4 = vec2( 0.2, 0.2);
- uniform sampler2D textureSample;
- #define sample(i) lowp vec4 sample##i = texture2D(textureSample, texCoord+offset##i)
- void main()
- {
- sample(0);
- sample(1);
- sample(2);
- sample(3);
- gl_FragColor.g = sample1.g * 1.1 - sample2.b * 0.2 * sample1.r;
- gl_FragColor.b = sample1.b * 1.1 - sample2.r * 0.2 * sample1.g;
- gl_FragColor.r = sample1.r * 1.1 - sample2.g * 0.2 * sample1.b;
- //gl_FragColor.r = 2.0/(gl_FragColor.r + 1.0) - 1.0;
- gl_FragColor.rgb = vec3(1.0) - gl_FragColor.rgb;
- gl_FragColor.a = 1.0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement