diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-08-09 17:54:46 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-08-10 16:43:48 +0300 |
commit | 723778b162869f81cf1f2a3fe936157c7f657df8 (patch) | |
tree | 5d4a0b00381736b92c3387b6ecb0a0f685596b80 /source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl | |
parent | d16342e5fd1f51c01bc1f9becc6ec0704d783de8 (diff) |
Eevee: Fix AO not working.
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 | 5 |
1 files changed, 2 insertions, 3 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 5a59e362fba..10758f74bf2 100644 --- a/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl @@ -7,7 +7,6 @@ /* NOTICE : this is multiplied by 2 */ #define MAX_THETA_STEP 12 -uniform sampler2D minMaxDepthTex; uniform vec3 aoParameters; #define aoDistance aoParameters.x @@ -16,7 +15,7 @@ uniform vec3 aoParameters; float get_max_horizon(vec2 co, vec3 x, float h, float lod) { - float depth = textureLod(minMaxDepthTex, co, floor(lod)).r; + float depth = textureLod(maxzBuffer, co, floor(lod)).r; /* Background case */ /* this is really slow and is only a problem @@ -158,7 +157,7 @@ void gtao(vec3 normal, vec3 position, vec2 noise, out float visibility #endif ) { - vec2 screenres = vec2(textureSize(minMaxDepthTex, 0)) * 2.0; + vec2 screenres = vec2(textureSize(maxzBuffer, 0)) * 2.0; vec2 pixel_size = vec2(1.0) / screenres.xy; /* Renaming */ |