diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-10-21 18:57:43 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-10-21 23:55:56 +0300 |
commit | 0cbe6387e90cb8ed85c8bd48e8c0ad413eca7f9d (patch) | |
tree | dc5c631ad1be430a9ac6e1fd07463242735c566f /source/blender/draw/engines | |
parent | 23ec1f90e71b8c2a63f42811ab4a7729f005f265 (diff) |
EEVEE: Screen Space Raytrace: Fix unreported banding artifacts
The artifact manifested as lines of different values caused by faillure to
trace the depth buffer correctly.
Adding a ad-hoc value to the step size to mitigate the issue.
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl b/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl index cad1346609a..225bf9b07db 100644 --- a/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl @@ -173,7 +173,8 @@ vec3 raycast(int index, float iter; for (iter = 1.0; !hit && (ray_time < max_time) && (iter < MAX_STEP); iter++) { /* Minimum stride of 2 because we are using half res minmax zbuffer. */ - float stride = max(1.0, iter * trace_quality) * 2.0; + /* WORKAROUND: Factor is a bit higher than 2 to avoid some banding. To investigate. */ + float stride = max(1.0, iter * trace_quality) * (2.0 + 0.05); float lod = log2(stride * 0.5 * trace_quality) * lod_fac; ray_time += stride; |