From 2d6a916835bd851b2ea03a2e887ba83f0065dae4 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 26 Aug 2019 17:43:58 -0300 Subject: Environment sky more or less working. --- servers/visual/rasterizer_rd/shaders/blur.glsl | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'servers/visual/rasterizer_rd/shaders/blur.glsl') 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 -- cgit v1.2.3