Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2021-03-04 13:59:49 +0300
committerClément Foucault <foucault.clem@gmail.com>2021-03-08 19:25:16 +0300
commitba75ea8012084aa84ba8c9ac088b88a8dcf4fb21 (patch)
tree32610751177961885185afee8f4c4773ccda4ced /source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl
parent6afe2d373a00a49a7a51cafec50d03ada0fe0743 (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.glsl3
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;