diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-15 00:16:03 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-15 00:16:03 +0300 |
commit | 26a827f25448bd82a099b15560d45f811cbf2b8f (patch) | |
tree | 2b7c0b1529c5697abd2ec892d08a2fa26db78084 /source | |
parent | 7710de26d0d768734977769af4a278b262f4da51 (diff) |
Workbench: Depth Of Field: Fix regression in look and avoid implicit cast
This is a fixup to rB7710de26d0d768734977769af4a278b262f4da51
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl index c1c1c264f42..1a0d01fde00 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl @@ -108,8 +108,8 @@ layout(location = 1) out vec2 outCocs; void main() { - vec4 texel = vec4(gl_FragCoord.xyxy) * 2 + vec4(0, 0, 1, 1); - texel = (texel + 0.5) / vec4(textureSize(sceneColorTex, 0).xyxy); + vec4 texel = vec4(gl_FragCoord.xyxy) * 2.0 + vec4(0.0, 0.0, 1.0, 1.0); + texel = (texel - 0.5) / vec4(textureSize(sceneColorTex, 0).xyxy); /* Using texelFetch can bypass the mip range setting on some platform. * Using texture Lod fix this issue. Note that we need to disable filtering to get the right |