Workbench: Depth Of Field: Fix regression in look and avoid implicit cast

This is a fixup to rB7710de26d0d768734977769af4a278b262f4da51
This commit is contained in:
Clément Foucault
2020-09-14 23:16:03 +02:00
parent 7710de26d0
commit 26a827f254

View File

@@ -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