avoid div by zero

This commit is contained in:
Seth Alves 2019-06-04 12:59:03 -07:00
parent 55daef837a
commit 8018a84e8b

View file

@ -474,6 +474,10 @@ void AmbientOcclusionEffect::updateBlurParameters() {
}
const auto occlusionSize = frameSize >> resolutionLevel;
if (occlusionSize.x == 0 || occlusionSize.y == 0) {
return;
}
// Occlusion UV limit
hblur._blurAxis.z = occlusionSize.x / float(frameSize.x);
hblur._blurAxis.w = occlusionSize.y / float(frameSize.y);