18 lines
411 B
GLSL
18 lines
411 B
GLSL
#version 300 es
|
|
precision highp float;
|
|
|
|
in vec2 v_texcoord;
|
|
uniform sampler2D tex;
|
|
out vec4 fragColor;
|
|
|
|
void main() {
|
|
float offset = 0.004;
|
|
|
|
float r = texture(tex, v_texcoord + vec2( offset, 0.0)).r;
|
|
float g = texture(tex, v_texcoord ).g;
|
|
float b = texture(tex, v_texcoord - vec2( offset, 0.0)).b;
|
|
float a = texture(tex, v_texcoord).a;
|
|
|
|
fragColor = vec4(r, g, b, a);
|
|
}
|