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:
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
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue