Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/paint_vertex_mode.c
| Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | if (!stl->g_data) { | ||||
| /* Alloc transient pointers */ | /* Alloc transient pointers */ | ||||
| stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); | stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); | ||||
| } | } | ||||
| { | { | ||||
| /* Create a pass */ | /* Create a pass */ | ||||
| psl->vcolor_faces = DRW_pass_create( | psl->vcolor_faces = DRW_pass_create( | ||||
| "Vert Color Pass", | "Vert Color Pass", | ||||
| DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND); | DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_MULTIPLY); | ||||
| stl->g_data->fvcolor_shgrp = DRW_shgroup_create(e_data.vcolor_face_shader, psl->vcolor_faces); | stl->g_data->fvcolor_shgrp = DRW_shgroup_create(e_data.vcolor_face_shader, psl->vcolor_faces); | ||||
| DRW_shgroup_uniform_float(stl->g_data->fvcolor_shgrp, "alpha", &v3d->overlay.vertex_paint_mode_opacity, 1); | DRW_shgroup_uniform_float_copy(stl->g_data->fvcolor_shgrp, "white_factor", 1.0f - v3d->overlay.vertex_paint_mode_opacity); | ||||
| } | } | ||||
| { | { | ||||
| psl->wire_overlay = DRW_pass_create( | psl->wire_overlay = DRW_pass_create( | ||||
| "Wire Pass", | "Wire Pass", | ||||
| DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL); | DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL); | ||||
| stl->g_data->lwire_shgrp = DRW_shgroup_create(e_data.wire_overlay_shader, psl->wire_overlay); | stl->g_data->lwire_shgrp = DRW_shgroup_create(e_data.wire_overlay_shader, psl->wire_overlay); | ||||
| ▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines | |||||