diff options
author | Miika Hamalainen <blender@miikah.org> | 2012-10-18 18:23:04 +0400 |
---|---|---|
committer | Miika Hamalainen <blender@miikah.org> | 2012-10-18 18:23:04 +0400 |
commit | c4b46f119c0cf85c25b825e9989dc0d4748cb64d (patch) | |
tree | 5c5c073e7f1d4ce58c19c820c71adf0f9eb2012b | |
parent | b861f8c3f82110de414f30e401163d23ede738eb (diff) |
Fix: Smoke 3d viewport shading was sometimes calculated incorrectly when adaptive domain was enabled.
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 0724ac2711f..c8d6ec73d28 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -2392,9 +2392,9 @@ static void smoke_calc_transparency(SmokeDomainSettings *sds, Scene *scene) /* convert light pos to sim cell space */ mul_m4_v3(sds->imat, light); - light[0] = (light[0] - sds->p0[0]) / sds->cell_size[0] - 0.5f; - light[1] = (light[1] - sds->p0[1]) / sds->cell_size[1] - 0.5f; - light[2] = (light[2] - sds->p0[2]) / sds->cell_size[2] - 0.5f; + light[0] = (light[0] - sds->p0[0]) / sds->cell_size[0] - 0.5f - (float)sds->res_min[0]; + light[1] = (light[1] - sds->p0[1]) / sds->cell_size[1] - 0.5f - (float)sds->res_min[1]; + light[2] = (light[2] - sds->p0[2]) / sds->cell_size[2] - 0.5f - (float)sds->res_min[2]; for (a = 0; a < size; a++) sds->shadow[a] = -1.0f; |