Fix T96243: Workbench Curvature not rendering in background.

When rendering using the command line the curvature wasn't rendered. The reason
was that the ui_scale wasn't initialized and therefore the same pixels where
sampled to detect the curvature. This is fixed by setting the ui_scale to 1 for any
image render.
This commit is contained in:
Jeroen Bakker 2022-03-11 13:51:50 +01:00 committed by Philipp Oeser
parent c3fed26f37
commit b6039cd82f
Notes: blender-bot 2023-02-14 06:42:53 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
Referenced by issue #96243, Workbench screnspace cavity not rendered in batch through command line
1 changed files with 1 additions and 1 deletions

View File

@ -290,7 +290,7 @@ void workbench_update_world_ubo(WORKBENCH_PrivateData *wpd)
copy_v2_v2(wd.viewport_size_inv, DRW_viewport_invert_size_get());
copy_v3_v3(wd.object_outline_color, wpd->shading.object_outline_color);
wd.object_outline_color[3] = 1.0f;
wd.ui_scale = G_draw.block.sizePixel;
wd.ui_scale = DRW_state_is_image_render() ? 1.0f : G_draw.block.sizePixel;
wd.matcap_orientation = (wpd->shading.flag & V3D_SHADING_MATCAP_FLIP_X) != 0;
workbench_studiolight_data_update(wpd, &wd);