forked from bartvdbraak/blender
Smoke: High res on even resolution did not write to all cells (downsampling = n-1, upsampling = n).
Thanks goes to MiikaH.
This commit is contained in:
parent
56b2f4df03
commit
a1dd6ea836
@ -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 < ceil((float)n / 2); i++) {
|
||||
for (int i = 0; i <= n / 2; i++) {
|
||||
to[i * stride] = 0;
|
||||
for (int k = 2 * i - 16; k < 2 * i + 16; k++) {
|
||||
// handle boundary
|
||||
|
Loading…
Reference in New Issue
Block a user