diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-05-14 17:18:12 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-05-15 18:52:09 +0300 |
commit | 45d3303ae42e0b563bd164148efa516f93261ba0 (patch) | |
tree | eeedfa2831886a5a77142285e7d254c80b317cb6 /source/blender/draw/engines/eevee | |
parent | f432b5ccf5c1b74583e4dd64ccdafa2a513b134d (diff) |
Fix T85845 EEVEE: Depth Of Field: Artifacts with slight out of focus
This was caused by the bokeh LUT being sampled outside the valid range.
But `texelFetch` is only valid if the sample actually exists. This lead to
undefined behavior.
The fix is to increase `DOF_MAX_SLIGHT_FOCUS_RADIUS` (which just offsets the
LUT along the X=Y axis) to avoid any sample outside the defined range.
Diffstat (limited to 'source/blender/draw/engines/eevee')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl index faac216480b..dac53719149 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl @@ -136,7 +136,7 @@ const float layer_offset_fg = 0.5 + 1.0; /* Extra offset for convolution layers to avoid light leaking from background. */ const float layer_offset = 0.5 + 0.5; -#define DOF_MAX_SLIGHT_FOCUS_RADIUS 5 +#define DOF_MAX_SLIGHT_FOCUS_RADIUS 16 float dof_layer_weight(float coc, const bool is_foreground) { |