19 lines
424 B
GLSL
19 lines
424 B
GLSL
#version 300 es
|
|
precision highp float;
|
|
|
|
in vec2 v_texcoord;
|
|
uniform sampler2D tex;
|
|
out vec4 fragColor;
|
|
|
|
void main() {
|
|
float o = 0.002;
|
|
|
|
vec4 c = texture(tex, v_texcoord) * 5.0;
|
|
c -= texture(tex, v_texcoord + vec2( 0, -o));
|
|
c -= texture(tex, v_texcoord + vec2(-o, 0));
|
|
c -= texture(tex, v_texcoord + vec2( o, 0));
|
|
c -= texture(tex, v_texcoord + vec2( 0, o));
|
|
|
|
fragColor = clamp(c, 0.0, 1.0);
|
|
}
|