Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_paint.c
| Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | case CTX_MODE_PAINT_WEIGHT: { | ||||
| DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); | DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); | ||||
| DRW_shgroup_uniform_bool_copy(grp, "drawContours", draw_contours); | DRW_shgroup_uniform_bool_copy(grp, "drawContours", draw_contours); | ||||
| DRW_shgroup_uniform_bool_copy(grp, "useAlphaBlend", pd->painting.alpha_blending); | DRW_shgroup_uniform_bool_copy(grp, "useAlphaBlend", pd->painting.alpha_blending); | ||||
| DRW_shgroup_uniform_float_copy(grp, "opacity", opacity); | DRW_shgroup_uniform_float_copy(grp, "opacity", opacity); | ||||
| DRW_shgroup_uniform_texture(grp, "colorramp", G_draw.weight_ramp); | DRW_shgroup_uniform_texture(grp, "colorramp", G_draw.weight_ramp); | ||||
| if (pd->painting.alpha_blending) { | if (pd->painting.alpha_blending) { | ||||
| state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL; | state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL; | ||||
| DRW_PASS_CREATE(psl->paint_depth_ps, state); | DRW_PASS_CREATE(psl->paint_depth_ps, state | pd->clipping_state); | ||||
| sh = OVERLAY_shader_depth_only(); | sh = OVERLAY_shader_depth_only(); | ||||
| pd->paint_depth_grp = DRW_shgroup_create(sh, psl->paint_depth_ps); | pd->paint_depth_grp = DRW_shgroup_create(sh, psl->paint_depth_ps); | ||||
| } | } | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| case CTX_MODE_PAINT_VERTEX: { | case CTX_MODE_PAINT_VERTEX: { | ||||
| opacity = pd->overlay.vertex_paint_mode_opacity; | opacity = pd->overlay.vertex_paint_mode_opacity; | ||||
| ▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines | |||||