diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-03-04 13:59:49 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-03-08 19:25:16 +0300 |
commit | ba75ea8012084aa84ba8c9ac088b88a8dcf4fb21 (patch) | |
tree | 32610751177961885185afee8f4c4773ccda4ced /source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl | |
parent | 6afe2d373a00a49a7a51cafec50d03ada0fe0743 (diff) |
EEVEE: Use Fullscreen maxZBuffer instead of halfres
This removes the need for per mipmap scalling factor and trilinear interpolation
issues. We pad the texture so that all mipmaps have pixels in the next mip.
This simplifies the downsampling shader too.
This also change the SSR radiance buffer as well in the same fashion.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl b/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl index 473990e1683..0b01b186b1b 100644 --- a/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl @@ -94,8 +94,7 @@ float search_horizon(vec3 vI, vec2 uv = uv_start + uv_dir * t; float lod = min(MAX_LOD, max(i - noise, 0.0) * aoQuality); - int mip = int(lod) + hizMipOffset; - float depth = textureLod(depth_tx, uv * mipRatio[mip].xy, floor(lod)).r; + float depth = textureLod(depth_tx, uv * hizUvScale.xy, floor(lod)).r; /* Bias depth a bit to avoid self shadowing issues. */ const float bias = 2.0 * 2.4e-7; |