From 8936550269333297f6c083c92c90f11660b22e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 14 Mar 2021 15:10:18 +0100 Subject: EEVEE: Specular Occlusion: Avoid overdarkening on smooth surfaces Accumulate error caused by the low amount of integration slices and correct it for the low roughness surfaces. This increases light leak but it is less distracting than dark fringe everywhere. --- .../gpu/shaders/material/gpu_shader_material_ambient_occlusion.glsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_ambient_occlusion.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_ambient_occlusion.glsl index edf2c93c9a0..12921a31b23 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_ambient_occlusion.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_ambient_occlusion.glsl @@ -15,8 +15,9 @@ void node_ambient_occlusion(vec4 color, vec3 N = normalize(normal); vec3 Ng = safe_normalize(cross(dFdx(worldPosition), dFdy(worldPosition))); + float unused_error; vec3 unused; - occlusion_eval(data, V, N, Ng, inverted, result_ao, unused); + occlusion_eval(data, V, N, Ng, inverted, result_ao, unused_error, unused); result_color = result_ao * color; } #else -- cgit v1.2.3