diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-05-13 00:18:27 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-05-13 00:28:55 +0300 |
commit | 5be0dfe086c7b3f2b705b90059a0d3c377effbf4 (patch) | |
tree | b957d1489ff162fb921370e749817167e00e820b | |
parent | d25ec499d89daf200c37ed547c50b1706d1b3557 (diff) |
Eevee: Fix Dof shader compilation.
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/effect_dof_vert.glsl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_vert.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_vert.glsl index 338003b92cd..6e43115d799 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_vert.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_vert.glsl @@ -40,7 +40,12 @@ void main() coc = min(coc, bokeh_maxsize); if (coc >= 1.0) { - color = texelFetch((is_near) ? nearBuffer : farBuffer, texelco, 0); + if (is_near) { + color = texelFetch(nearBuffer, texelco, 0); + } + else { + color = texelFetch(farBuffer, texelco, 0); + } /* find the area the pixel will cover and divide the color by it */ color.a = 1.0 / (coc * coc * M_PI); color.rgb *= color.a; |