Skip to content

Commit

Permalink
Fix backfacing AO
Browse files Browse the repository at this point in the history
  • Loading branch information
pragma37 committed Jul 13, 2024
1 parent 907b1c5 commit 08949f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ float ao(int samples, float radius, float distribution_exponent, float contrast,
vec3 normal = NORMAL;
#ifdef IS_MESH_SHADER
{
normal = IO_NORMAL;
normal = is_front_facing() ? IO_NORMAL : -IO_NORMAL;
}
#endif
float ao = ao(IN_NORMAL_DEPTH, 3, POSITION, normal, samples, radius, distribution_exponent, bias);
Expand Down

0 comments on commit 08949f9

Please sign in to comment.