Commit: 10cfa388479cb21f2906328d943eab174acfcbde
Author: Sriharsha Kotcharlakot
Date:   Mon Sep 7 14:51:36 2020 +0530
Branches: soc-2020-fluid-tools
https://developer.blender.org/rB10cfa388479cb21f2906328d943eab174acfcbde

Included `world_block` UBO in the shading groups for volume in Workbench when 
slicing is used to avoid 'Missing UBO bind' error as in P1616.

===================================================================

M       source/blender/draw/engines/workbench/workbench_volume.c

===================================================================

diff --git a/source/blender/draw/engines/workbench/workbench_volume.c 
b/source/blender/draw/engines/workbench/workbench_volume.c
index 4a9fb05b586..148760e3750 100644
--- a/source/blender/draw/engines/workbench/workbench_volume.c
+++ b/source/blender/draw/engines/workbench/workbench_volume.c
@@ -127,6 +127,7 @@ static void 
workbench_volume_modifier_cache_populate(WORKBENCH_Data *vedata,
     float step_length = max_ff(1e-16f, dim[axis] * 0.05f);
 
     grp = DRW_shgroup_create(sh, vedata->psl->volume_ps);
+    DRW_shgroup_uniform_block(grp, "world_block", wpd->world_ubo);
     DRW_shgroup_uniform_float_copy(grp, "slicePosition", fds->slice_depth);
     DRW_shgroup_uniform_int_copy(grp, "sliceAxis", axis);
     DRW_shgroup_uniform_float_copy(grp, "stepLength", step_length);
@@ -269,6 +270,7 @@ static void 
workbench_volume_object_cache_populate(WORKBENCH_Data *vedata,
     const float slice_position = volume->display.slice_depth;
 
     grp = DRW_shgroup_create(sh, vedata->psl->volume_ps);
+    DRW_shgroup_uniform_block(grp, "world_block", wpd->world_ubo);
     DRW_shgroup_uniform_float_copy(grp, "slicePosition", slice_position);
     DRW_shgroup_uniform_int_copy(grp, "sliceAxis", axis);
     DRW_shgroup_uniform_float_copy(grp, "stepLength", step_length);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to