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.
This commit is contained in:
Brecht Van Lommel 2014-04-15 15:54:56 +02:00
parent 976f59ab8c
commit f270b34e99
Notes: blender-bot 2023-02-14 11:32:10 +01:00
Referenced by issue #37675, BI viewport render gives incorrect result with volumes
1 changed files with 4 additions and 0 deletions

View File

@ -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) {