From d40b03ccbb40bdfb23125f0768446a570823d79e Mon Sep 17 00:00:00 2001 From: Xonk Date: Mon, 31 Jul 2023 18:30:41 -0400 Subject: [PATCH] fix AO multiplier setting for SSAO --- shaders/composite1.fsh | 2 +- shaders/lib/PhotonGTAO.glsl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shaders/composite1.fsh b/shaders/composite1.fsh index b82849c..8b897fc 100644 --- a/shaders/composite1.fsh +++ b/shaders/composite1.fsh @@ -461,7 +461,7 @@ void ssAO(inout vec3 lighting, inout float sss, vec3 fragpos,float mulfov, vec2 #ifdef Ambient_SSS sss = max(1.0 - sss/n, 0.0) ; #endif - + occlusion *= AO_Strength; occlusion *= 2.0; occlusion = max(1.0 - occlusion/n, 0.0); diff --git a/shaders/lib/PhotonGTAO.glsl b/shaders/lib/PhotonGTAO.glsl index af5046f..dd3478a 100644 --- a/shaders/lib/PhotonGTAO.glsl +++ b/shaders/lib/PhotonGTAO.glsl @@ -174,11 +174,11 @@ float ambient_occlusion(vec3 screen_pos, vec3 view_pos, vec3 view_normal, vec2 d max_horizon_angles.x = calculate_maximum_horizon_angle(-view_slice_dir, viewer_dir, screen_pos, view_pos, dither.y); max_horizon_angles.y = calculate_maximum_horizon_angle( view_slice_dir, viewer_dir, screen_pos, view_pos, dither.y); - max_horizon_angles = gamma + clamp(vec2(-1.0, 1.0) * max_horizon_angles - gamma, -half_pi, half_pi); + max_horizon_angles = gamma + clamp(vec2(-1.0, 1.0) * max_horizon_angles - gamma, -half_pi, half_pi) ; vec3 max_horizon_angles2 = mat3(gbufferModelViewInverse) * projected_normal; - ao += integrate_arc(max_horizon_angles, gamma, cos_gamma) * len_sq * norm * max_horizon_angles.y; + ao += integrate_arc(max_horizon_angles, gamma, cos_gamma) * len_sq * norm * max_horizon_angles.y ; } ao *= rcp(float(GTAO_SLICES));