summaryrefslogtreecommitdiff
path: root/drivers/gles3/shaders/effect_blur.glsl
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-15 13:05:50 +0200
committerGitHub <noreply@github.com>2019-04-15 13:05:50 +0200
commitdab8f8c953cd8ca18e792cc7aa0b717b38804e01 (patch)
treedbf1fb2be4adba02dac52a6897b892d555f7e782 /drivers/gles3/shaders/effect_blur.glsl
parent5d65100669e8a8ece09677feb744c69b4466aa90 (diff)
parent670c1b10b2b158cd400fcade42ca26363d4bb49c (diff)
Merge pull request #27967 from clayjohn/fix-mip-bug
Fixed bug in computing mip maps from screen texture
Diffstat (limited to 'drivers/gles3/shaders/effect_blur.glsl')
-rw-r--r--drivers/gles3/shaders/effect_blur.glsl5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gles3/shaders/effect_blur.glsl b/drivers/gles3/shaders/effect_blur.glsl
index fc15ca31b1..ff5a9f326f 100644
--- a/drivers/gles3/shaders/effect_blur.glsl
+++ b/drivers/gles3/shaders/effect_blur.glsl
@@ -117,12 +117,13 @@ void main() {
#ifdef GAUSSIAN_HORIZONTAL
vec2 pix_size = pixel_size;
pix_size *= 0.5; //reading from larger buffer, so use more samples
+ // sigma 2
vec4 color = textureLod(source_color, uv_interp + vec2(0.0, 0.0) * pix_size, lod) * 0.214607;
color += textureLod(source_color, uv_interp + vec2(1.0, 0.0) * pix_size, lod) * 0.189879;
- color += textureLod(source_color, uv_interp + vec2(2.0, 0.0) * pix_size, lod) * 0.157305;
+ color += textureLod(source_color, uv_interp + vec2(2.0, 0.0) * pix_size, lod) * 0.131514;
color += textureLod(source_color, uv_interp + vec2(3.0, 0.0) * pix_size, lod) * 0.071303;
color += textureLod(source_color, uv_interp + vec2(-1.0, 0.0) * pix_size, lod) * 0.189879;
- color += textureLod(source_color, uv_interp + vec2(-2.0, 0.0) * pix_size, lod) * 0.157305;
+ color += textureLod(source_color, uv_interp + vec2(-2.0, 0.0) * pix_size, lod) * 0.131514;
color += textureLod(source_color, uv_interp + vec2(-3.0, 0.0) * pix_size, lod) * 0.071303;
frag_color = color;
#endif