fix AO multiplier setting for SSAO

This commit is contained in:
Xonk 2023-07-31 18:30:41 -04:00
parent a3090da0d6
commit d40b03ccbb
2 changed files with 3 additions and 3 deletions

View File

@ -461,7 +461,7 @@ void ssAO(inout vec3 lighting, inout float sss, vec3 fragpos,float mulfov, vec2
#ifdef Ambient_SSS #ifdef Ambient_SSS
sss = max(1.0 - sss/n, 0.0) ; sss = max(1.0 - sss/n, 0.0) ;
#endif #endif
occlusion *= AO_Strength;
occlusion *= 2.0; occlusion *= 2.0;
occlusion = max(1.0 - occlusion/n, 0.0); occlusion = max(1.0 - occlusion/n, 0.0);

View File

@ -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.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.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; 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)); ao *= rcp(float(GTAO_SLICES));