Fix T79509 Workbench: Object color mode broken if more than 4096 objects
This was due to the new DRWShadingGroup not being saved and reused for the next objects.
This commit is contained in:
parent
a316d3b6c6
commit
cf3431e0e8
Notes:
blender-bot
2023-02-14 04:10:15 +01:00
Referenced by issue #79509, Viewport colour (Solid shading mode, Object color) shows one colour but another is displayed instead for more than 4096 objects Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -231,15 +231,15 @@ DRWShadingGroup *workbench_material_setup_ex(WORKBENCH_PrivateData *wpd,
|
|||
workbench_material_ubo_data(wpd, ob, NULL, &wpd->material_ubo_data_curr[mat_id], color_type);
|
||||
|
||||
const bool transp = wpd->shading.xray_alpha < 1.0f || ob->color[3] < 1.0f;
|
||||
DRWShadingGroup *grp = wpd->prepass[transp][infront][datatype].common_shgrp;
|
||||
DRWShadingGroup **grp = &wpd->prepass[transp][infront][datatype].common_shgrp;
|
||||
if (resource_changed) {
|
||||
grp = DRW_shgroup_create_sub(grp);
|
||||
DRW_shgroup_uniform_block(grp, "material_block", wpd->material_ubo_curr);
|
||||
*grp = DRW_shgroup_create_sub(*grp);
|
||||
DRW_shgroup_uniform_block(*grp, "material_block", wpd->material_ubo_curr);
|
||||
}
|
||||
if (r_transp && transp) {
|
||||
*r_transp = true;
|
||||
}
|
||||
return grp;
|
||||
return *grp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue