26 lines
598 B
GLSL
26 lines
598 B
GLSL
#version 100
|
|
|
|
//_DEFINES_
|
|
|
|
precision highp float;
|
|
|
|
varying vec2 v_coords;
|
|
|
|
uniform sampler2D tex;
|
|
uniform vec2 half_pixel;
|
|
uniform float offset;
|
|
|
|
uniform float alpha;
|
|
#if defined(DEBUG_FLAGS)
|
|
uniform float tint;
|
|
#endif
|
|
|
|
void main() {
|
|
vec4 sum = texture2D(tex, v_coords) * 4.0;
|
|
sum += texture2D(tex, v_coords - half_pixel * offset);
|
|
sum += texture2D(tex, v_coords + half_pixel * offset);
|
|
sum += texture2D(tex, v_coords + vec2(half_pixel.x, -half_pixel.y) * offset);
|
|
sum += texture2D(tex, v_coords - vec2(half_pixel.x, -half_pixel.y) * offset);
|
|
|
|
gl_FragColor = sum / sum.a;
|
|
}
|