diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-08-20 17:21:44 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-08-20 17:21:44 +0300 |
commit | 1c7119a33616f35c2afb172765cb494e5faab689 (patch) | |
tree | 78578fab2dc34a57e1b2d5ab8bd0f16698164410 /source/blender/draw/engines/workbench/workbench_deferred.c | |
parent | 47d43c5a00aed963cc59eee35e263e4d3eb9f66d (diff) |
Wrokbench: Add support for maximum drawtype OB_TEXTURE
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_deferred.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_deferred.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_deferred.c b/source/blender/draw/engines/workbench/workbench_deferred.c index 696393a6ae1..c72e1d9fece 100644 --- a/source/blender/draw/engines/workbench/workbench_deferred.c +++ b/source/blender/draw/engines/workbench/workbench_deferred.c @@ -625,7 +625,7 @@ static WORKBENCH_MaterialData *get_or_create_material_data( workbench_material_copy(material, &material_template); DRW_shgroup_stencil_mask(material->shgrp, (ob->dtx & OB_DRAWXRAY) ? 0x00 : 0xFF); DRW_shgroup_uniform_int(material->shgrp, "object_id", &material->object_id, 1); - workbench_material_shgroup_uniform(wpd, material->shgrp, material); + workbench_material_shgroup_uniform(wpd, material->shgrp, material, ob); BLI_ghash_insert(wpd->material_hash, SET_UINT_IN_POINTER(hash), material); } @@ -659,7 +659,7 @@ static void workbench_cache_populate_particles(WORKBENCH_Data *vedata, Object *o Image *image = NULL; Material *mat = give_current_material(ob, part->omat); ED_object_get_active_image(ob, part->omat, &image, NULL, NULL, NULL); - int color_type = workbench_material_determine_color_type(wpd, image); + int color_type = workbench_material_determine_color_type(wpd, image, ob); WORKBENCH_MaterialData *material = get_or_create_material_data(vedata, ob, mat, image, color_type); struct GPUShader *shader = (color_type != V3D_SHADING_TEXTURE_COLOR) ? @@ -671,7 +671,7 @@ static void workbench_cache_populate_particles(WORKBENCH_Data *vedata, Object *o shader); DRW_shgroup_stencil_mask(shgrp, (ob->dtx & OB_DRAWXRAY) ? 0x00 : 0xFF); DRW_shgroup_uniform_int(shgrp, "object_id", &material->object_id, 1); - workbench_material_shgroup_uniform(wpd, shgrp, material); + workbench_material_shgroup_uniform(wpd, shgrp, material, ob); } } } @@ -725,7 +725,7 @@ void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob) Material *mat = give_current_material(ob, i + 1); Image *image; ED_object_get_active_image(ob, i + 1, &image, NULL, NULL, NULL); - int color_type = workbench_material_determine_color_type(wpd, image); + int color_type = workbench_material_determine_color_type(wpd, image, ob); material = get_or_create_material_data(vedata, ob, mat, image, color_type); DRW_shgroup_call_object_add(material->shgrp, geom_array[i], ob); } |