Skip to content

Commit 08949f9

Browse files
committed
Fix backfacing AO
1 parent 907b1c5 commit 08949f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Malt/Pipelines/NPR_Pipeline/Shaders/NPR_Pipeline/NPR_Filters.glsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ float ao(int samples, float radius, float distribution_exponent, float contrast,
2929
vec3 normal = NORMAL;
3030
#ifdef IS_MESH_SHADER
3131
{
32-
normal = IO_NORMAL;
32+
normal = is_front_facing() ? IO_NORMAL : -IO_NORMAL;
3333
}
3434
#endif
3535
float ao = ao(IN_NORMAL_DEPTH, 3, POSITION, normal, samples, radius, distribution_exponent, bias);

0 commit comments

Comments
 (0)