[Bf-blender-cvs] [9aece5e1e77] blender2.8: Eevee: Fix Defered AO defines
Clément Foucault
noreply at git.blender.org
Sat Nov 25 17:51:03 CET 2017
Commit: 9aece5e1e7748fa6020a3b6cbeabd17e1dc3bbaa
Author: Clément Foucault
Date: Sat Nov 25 17:47:32 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB9aece5e1e7748fa6020a3b6cbeabd17e1dc3bbaa
Eevee: Fix Defered AO defines
===================================================================
M source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl
===================================================================
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 8d5f11d76f2..5ec72833379 100644
--- a/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl
@@ -339,18 +339,13 @@ float gtao_multibounce(float visibility, vec3 albedo)
/* Use the right occlusion */
float occlusion_compute(vec3 N, vec3 vpos, float user_occlusion, vec2 randuv, out vec3 bent_normal)
{
- if ((int(aoSettings) & USE_AO) == 0) {
- bent_normal = N;
- return user_occlusion;
- }
- else {
+#ifndef USE_REFRACTION
+ if ((int(aoSettings) & USE_AO) > 0) {
float visibility;
vec3 vnor = mat3(ViewMatrix) * N;
#ifdef ENABLE_DEFERED_AO
-#ifndef USE_REFRACTION
gtao_deferred(vnor, vpos, gl_FragCoord.z, visibility, bent_normal);
-#endif
#else
gtao(vnor, vpos, randuv, visibility, bent_normal);
#endif
@@ -375,4 +370,8 @@ float occlusion_compute(vec3 N, vec3 vpos, float user_occlusion, vec2 randuv, ou
return min(visibility, user_occlusion);
}
+#endif
+
+ bent_normal = N;
+ return user_occlusion;
}
More information about the Bf-blender-cvs
mailing list