Mindustry/core/assets/bloomshaders/alpha_gaussian.frag

19 lines
547 B
GLSL
Raw Normal View History

2019-06-25 06:39:57 +07:00
2020-06-11 23:03:27 +07:00
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;
2019-06-25 06:39:57 +07:00
const float center = 0.2270270270;
const float close = 0.3162162162;
const float far = 0.0702702703;
2020-06-11 23:03:27 +07:00
2020-05-11 11:41:35 +07:00
void main(){
2019-06-25 06:39:57 +07:00
gl_FragColor = far * texture2D(u_texture, v_texCoords0)
+ close * texture2D(u_texture, v_texCoords1)
+ center * texture2D(u_texture, v_texCoords2)
+ close * texture2D(u_texture, v_texCoords3)
+ far * texture2D(u_texture, v_texCoords4);
}