diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-08-26 17:43:58 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-11 12:01:05 +0100 |
commit | 2d6a916835bd851b2ea03a2e887ba83f0065dae4 (patch) | |
tree | 25542172b4275da52396b40033d8e77f7e2ce64c /servers/visual/rasterizer_rd/shaders/blur.glsl | |
parent | f7aa7927e7268f7b9f99eed18e13dd04e25be8b2 (diff) |
Environment sky more or less working.
Diffstat (limited to 'servers/visual/rasterizer_rd/shaders/blur.glsl')
-rw-r--r-- | servers/visual/rasterizer_rd/shaders/blur.glsl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/servers/visual/rasterizer_rd/shaders/blur.glsl b/servers/visual/rasterizer_rd/shaders/blur.glsl index 830d4d7d94..4f47595d2c 100644 --- a/servers/visual/rasterizer_rd/shaders/blur.glsl +++ b/servers/visual/rasterizer_rd/shaders/blur.glsl @@ -85,6 +85,17 @@ const float dof_kernel[21] = float[](0.028174, 0.032676, 0.037311, 0.041944, 0.0 void main() { +#ifdef MODE_MIPMAP + + vec2 pix_size = blur.pixel_size; + vec4 color = texture(source_color, uv_interp + vec2(-0.5,-0.5) * pix_size); + color += texture(source_color, uv_interp + vec2(0.5,-0.5) * pix_size); + color += texture(source_color, uv_interp + vec2(0.5,0.5) * pix_size); + color += texture(source_color, uv_interp + vec2(-0.5,0.5) * pix_size); + frag_color = color / 4.0; + +#endif + #ifdef MODE_GAUSSIAN_BLUR //Simpler blur uses SIGMA2 for the gaussian kernel for a stronger effect |