@@ -75,7 +75,7 @@ float G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const i
float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
- return 0.5 / ( gv + gl );
+ return 0.5 / max( gv + gl, EPSILON );
}