Mindustry/core/assets/bloomshaders/gaussian.frag
Anuken 732769524c 🔥🔥🔥
2020-06-11 12:03:27 -04:00

19 lines
571 B
GLSL

uniform lowp sampler2D u_texture;
varying vec2 v_texCoords0;
varying vec2 v_texCoords1;
varying vec2 v_texCoords2;
varying vec2 v_texCoords3;
varying vec2 v_texCoords4;
const float center = 0.2270270270;
const float close = 0.3162162162;
const float far = 0.0702702703;
void main(){
gl_FragColor.rgb = far * texture2D(u_texture, v_texCoords0).rgb
+ close * texture2D(u_texture, v_texCoords1).rgb
+ center * texture2D(u_texture, v_texCoords2).rgb
+ close * texture2D(u_texture, v_texCoords3).rgb
+ far * texture2D(u_texture, v_texCoords4).rgb;
}