DRW: Fix render wrong orthographic depth conversion

Fix for both workbench and Gpencil.

Fixes T78574 GPencil: Z pass combine not work
This commit is contained in:
Clément Foucault 2021-02-01 13:49:07 +01:00
parent 03c1c5f3a4
commit d1ee8a0502
Notes: blender-bot 2024-05-08 11:36:44 +02:00
Referenced by issue #78574, GPencil: Z pass combine not work
2 changed files with 2 additions and 2 deletions

View File

@ -213,7 +213,7 @@ static void GPENCIL_render_result_z(struct RenderLayer *rl,
rp->rect[i] = 1e10f; /* Background */
}
else {
rp->rect[i] = -rp->rect[i] * range + near;
rp->rect[i] = rp->rect[i] * range - near;
}
}
}

View File

@ -155,7 +155,7 @@ static void workbench_render_result_z(struct RenderLayer *rl,
rp->rect[i] = 1e10f; /* Background */
}
else {
rp->rect[i] = -rp->rect[i] * range + near;
rp->rect[i] = rp->rect[i] * range - near;
}
}
}