Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2021-05-15 18:48:26 +0300
committerClément Foucault <foucault.clem@gmail.com>2021-05-15 18:52:09 +0300
commit5d97e293c30b41bcd84a2d831ae35e67d8e54670 (patch)
tree0e3cc5adf314713e56a8e2427f104116b13efa4d /source/blender/draw/engines
parent45d3303ae42e0b563bd164148efa516f93261ba0 (diff)
EEVEE: Depth of Field: Fix tile artifacts in mixed focus regions
This was caused by the slight focus gather not being wide enough for small radii. Now the cast to int will properly round the radius to the nearest integer. This is related to T86244 Black Artefacts in EEVEE on Transparent BSDF
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r--source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl
index cd69a0e2ab1..32841b7749c 100644
--- a/source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl
@@ -40,7 +40,7 @@ void dof_slight_focus_gather(float radius, out vec4 out_color, out float out_wei
DofGatherData fg_accum = GATHER_DATA_INIT;
DofGatherData bg_accum = GATHER_DATA_INIT;
- int i_radius = clamp(int(radius), 0, int(layer_threshold));
+ int i_radius = clamp(int(radius + 0.5), 0, int(layer_threshold));
const int resolve_ring_density = DOF_SLIGHT_FOCUS_DENSITY;
ivec2 texel = ivec2(gl_FragCoord.xy);