mirror of
https://github.com/lubosz/overte.git
synced 2025-04-05 21:22:00 +02:00
avoid div by zero
This commit is contained in:
parent
55daef837a
commit
8018a84e8b
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue