Fix small issue found in vertex color bake bug that caused the result to be

different each time, due to float precision issues. The camera matrix itself
should not be modified in render, just its copy.
This commit is contained in:
Brecht Van Lommel
2013-01-23 13:13:10 +00:00
parent 3e6892e18f
commit a03cc5c6c5

View File

@@ -5082,8 +5082,8 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l
* following calls don't depend on 'RE_SetCamera' */
RE_SetCamera(re, camera);
normalize_m4(camera->obmat);
invert_m4_m4(mat, camera->obmat);
normalize_m4_m4(mat, camera->obmat);
invert_m4(mat);
RE_SetView(re, mat);
camera->recalc= OB_RECALC_OB; /* force correct matrix for scaled cameras */
}
@@ -5232,8 +5232,8 @@ static void database_fromscene_vectors(Render *re, Scene *scene, unsigned int la
/* if no camera, viewmat should have been set! */
if (camera) {
normalize_m4(camera->obmat);
invert_m4_m4(mat, camera->obmat);
normalize_m4_m4(mat, camera->obmat);
invert_m4(mat);
RE_SetView(re, mat);
}
@@ -5772,8 +5772,8 @@ void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay,
/* if no camera, set unit */
if (camera) {
normalize_m4(camera->obmat);
invert_m4_m4(mat, camera->obmat);
normalize_m4_m4(mat, camera->obmat);
invert_m4(mat);
RE_SetView(re, mat);
}
else {