From 8a0f6aa2f27c84e12def8a0f0a0b408563afb192 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 1 Aug 2012 20:29:37 +0000 Subject: Bugfix: High resolution "exploded" when using uneven resolutions, sometimes with specific object scaling. Part of Smoke Development Phase III. Credit also goes to MiikaH: It was a teamwork effort and took days to track down. :) --- intern/smoke/intern/WAVELET_NOISE.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/smoke') diff --git a/intern/smoke/intern/WAVELET_NOISE.h b/intern/smoke/intern/WAVELET_NOISE.h index 66dfb95d143..4806c6a9fc1 100644 --- a/intern/smoke/intern/WAVELET_NOISE.h +++ b/intern/smoke/intern/WAVELET_NOISE.h @@ -107,7 +107,7 @@ static void downsampleNeumann(const float *from, float *to, int n, int stride) // if these values are not local incorrect results are generated float downCoeffs[32] = { DOWNCOEFFS }; const float *const aCoCenter= &downCoeffs[16]; - for (int i = 0; i < n / 2; i++) { + for (int i = 0; i < ceil((float)n / 2); i++) { to[i * stride] = 0; for (int k = 2 * i - 16; k < 2 * i + 16; k++) { // handle boundary -- cgit v1.2.3