diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-04-15 17:54:56 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-04-15 17:56:56 +0400 |
commit | f270b34e99beca48f71e1b66c13c3b113d8d75fa (patch) | |
tree | 8d48a0cb2edcf4e2b42d5cf01a4a8a25fb073d91 /source/blender | |
parent | 976f59ab8cb4ee8822a06ed8c75350460afa2220 (diff) |
Fix T37675: blender internal viewport render wrong for volumes after rotation.
We really should not have Object.imat_ren, that's the wrong place to put render
data. But just update it now on rotation rather than doing a bigger refactor to
remove it.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/render/intern/source/envmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index 39b9a0f0b63..88c351f3f00 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -321,6 +321,10 @@ void env_rotate_scene(Render *re, float mat[4][4], int do_rotate) mul_m4_v3(tmat, har->co); } + + /* imat_ren is needed for correct texture coordinates */ + mul_m4_m4m4(obr->ob->imat_ren, re->viewmat, obr->ob->obmat); + invert_m4(obr->ob->imat_ren); } for (go = re->lights.first; go; go = go->next) { |