Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/workbench_forward.c
| Show First 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | if (material == NULL) { | ||||
| workbench_material_shgroup_uniform(wpd, grp, material, ob, false, is_tiled, interp); | workbench_material_shgroup_uniform(wpd, grp, material, ob, false, is_tiled, interp); | ||||
| material->shgrp = grp; | material->shgrp = grp; | ||||
| /* Depth */ | /* Depth */ | ||||
| if (color_type == V3D_SHADING_TEXTURE_COLOR) { | if (color_type == V3D_SHADING_TEXTURE_COLOR) { | ||||
| material->shgrp_object_outline = DRW_shgroup_create(sh_data->object_outline_texture_sh, | material->shgrp_object_outline = DRW_shgroup_create(sh_data->object_outline_texture_sh, | ||||
| psl->object_outline_pass); | psl->object_outline_pass); | ||||
| GPUTexture *tex = GPU_texture_from_blender(material->ima, material->iuser, GL_TEXTURE_2D); | GPUTexture *tex = GPU_texture_from_blender( | ||||
| material->ima, material->iuser, NULL, GL_TEXTURE_2D); | |||||
| 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(sh_data->object_outline_sh, | material->shgrp_object_outline = DRW_shgroup_create(sh_data->object_outline_sh, | ||||
| psl->object_outline_pass); | psl->object_outline_pass); | ||||
| } | } | ||||
| if (draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED) { | if (draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED) { | ||||
| DRW_shgroup_state_enable(material->shgrp_object_outline, DRW_STATE_CLIP_PLANES); | DRW_shgroup_state_enable(material->shgrp_object_outline, DRW_STATE_CLIP_PLANES); | ||||
| ▲ Show 20 Lines • Show All 631 Lines • Show Last 20 Lines | |||||