Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/workbench_forward.c
| Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | if (workbench_material_determine_color_type(wpd, material->ima, ob) == V3D_SHADING_TEXTURE_COLOR) { | ||||
| DRW_shgroup_uniform_texture(material->shgrp_object_outline, "image", tex); | DRW_shgroup_uniform_texture(material->shgrp_object_outline, "image", tex); | ||||
| } | } | ||||
| else { | else { | ||||
| material->shgrp_object_outline = DRW_shgroup_create( | material->shgrp_object_outline = DRW_shgroup_create( | ||||
| e_data.object_outline_sh, psl->object_outline_pass); | e_data.object_outline_sh, psl->object_outline_pass); | ||||
| } | } | ||||
| material->object_id = engine_object_data->object_id; | material->object_id = engine_object_data->object_id; | ||||
| DRW_shgroup_uniform_int(material->shgrp_object_outline, "object_id", &material->object_id, 1); | DRW_shgroup_uniform_int(material->shgrp_object_outline, "object_id", &material->object_id, 1); | ||||
| if (wpd->world_clip_planes) { | if (WORLD_CLIPPING_ENABLED(wpd)) { | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| RegionView3D *rv3d = draw_ctx->rv3d; | RegionView3D *rv3d = draw_ctx->rv3d; | ||||
| DRW_shgroup_world_clip_planes_from_rv3d(material->shgrp_object_outline, rv3d); | DRW_shgroup_world_clip_planes_from_rv3d(material->shgrp_object_outline, rv3d); | ||||
| } | } | ||||
| BLI_ghash_insert(wpd->material_transp_hash, POINTER_FROM_UINT(hash), material); | BLI_ghash_insert(wpd->material_transp_hash, POINTER_FROM_UINT(hash), material); | ||||
| } | } | ||||
| return material; | return material; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 475 Lines • Show Last 20 Lines | |||||