diff options
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_data.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_data.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c index b009a8acb08..97b585c1215 100644 --- a/source/blender/draw/engines/workbench/workbench_data.c +++ b/source/blender/draw/engines/workbench/workbench_data.c @@ -76,6 +76,12 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd) wpd->shading.studio_light, STUDIOLIGHT_TYPE_STUDIO); } + + float shadow_focus = scene->display.shadow_focus; + /* Clamp to avoid overshadowing and shading errors. */ + CLAMP(shadow_focus, 0.0001f, 0.99999f); + wpd->shadow_shift = scene->display.shadow_shift; + wpd->shadow_focus = 1.0f - shadow_focus * (1.0f - wpd->shadow_shift); wpd->shadow_multiplier = 1.0 - wpd->shading.shadow_intensity; WORKBENCH_UBO_World *wd = &wpd->world_data; |