DRW: Remove is_negative_m4 per draw call

This had some cost in perf and is not needed most of the time. If the
drawcall really needs it, it should use a correct ob pointer.
This commit is contained in:
Clément Foucault 2019-05-06 17:08:48 +02:00
parent ff90589966
commit ddb71e8c20
Notes: blender-bot 2023-02-14 02:46:52 +01:00
Referenced by issue #64284, Mirroed Collection Intances have flipped normals/face orientation.
Referenced by issue #64249, Mirrored collection instances have wrong shading
1 changed files with 1 additions and 1 deletions

View File

@ -400,7 +400,7 @@ static DRWCallState *drw_call_state_create(DRWShadingGroup *shgroup, float (*obm
if (obmat != NULL) {
copy_m4_m4(state->model, obmat);
if (is_negative_m4(state->model)) {
if (ob && (ob->transflag & OB_NEG_SCALE)) {
state->flag |= DRW_CALL_NEGSCALE;
}
}