diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-05-29 18:50:32 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-05-29 18:50:51 +0300 |
commit | 929c78e33c06f55af4a3d98240959c4afcf9f39c (patch) | |
tree | 7fa3aa1d68799a92e2e6afe42f6f52ce643ab70c /source/blender/draw/engines/eevee | |
parent | 08b8fa086396ef581e23c14b78504c96a7a1d005 (diff) |
EEVEE: LookDev blurred background
Diffstat (limited to 'source/blender/draw/engines/eevee')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/default_world_frag.glsl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl b/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl index d2a654cecda..1f0ef76da0c 100644 --- a/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl @@ -1,3 +1,4 @@ + #define M_PI 3.14159265358979323846 uniform float backgroundAlpha; @@ -35,8 +36,9 @@ void node_tex_environment_equirectangular(vec3 co, sampler2D ima, out vec4 color float v = atan(nco.z, hypot(nco.x, nco.y)) / M_PI + 0.5; /* Fix pole bleeding */ - float half_width = 0.5 / float(textureSize(ima, 0).x); - v = clamp(v, half_width, 1.0 - half_width); + float width = float(textureSize(ima, 0).x); + float texel_width = 1.0 / width; + v = clamp(v, texel_width, 1.0 - texel_width); /* Fix u = 0 seam */ /* This is caused by texture filtering, since uv don't have smooth derivatives |