SSAO can me 0 sometimes

This commit is contained in:
Vincent Lejeune 2015-01-12 20:13:11 +01:00
parent b8ab68b31a
commit 95e2213b1e

View File

@ -62,5 +62,5 @@ void main(void)
bl += max(0, dot(vi, norm) - FragPos.z * beta) / (dot(vi, vi) + epsilon); bl += max(0, dot(vi, norm) - FragPos.z * beta) / (dot(vi, vi) + epsilon);
} }
AO = max(pow(1.0 - min(2. * sigma * bl * invSamples, 0.99), k), 0.1); AO = max(pow(1.0 - min(2. * sigma * bl * invSamples, 0.99), k), 0.);
} }