Fix T65035: Wokbench Material Alpha

When using texture drawing the material alpha was not set correctly, It
used the `shading.xray_alpha` as this was the default set in the forward
renderer.
This commit is contained in:
2019-05-23 16:31:13 +02:00
parent b432209f63
commit 28ad1e0b1f

View File

@@ -983,6 +983,8 @@ void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob)
workbench_material_get_image_and_mat(ob, i + 1, &image, &iuser, &interp, &mat);
int color_type = workbench_material_determine_color_type(wpd, image, ob, is_sculpt_mode);
if (color_type == V3D_SHADING_MATERIAL_COLOR && mat && mat->a < 1.0) {
/* Hack */
wpd->shading.xray_alpha = mat->a;
material = workbench_forward_get_or_create_material_data(
vedata, ob, mat, image, iuser, color_type, 0, is_sculpt_mode);
has_transp_mat = true;