Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl
| Show All 11 Lines | vec4 EDIT_MESH_edge_color_outer(int edge_flag, int face_flag, float crease, float bweight) | ||||
| color = (bweight > 0.0) ? vec4(colorEdgeBWeight.rgb, bweight) : color; | color = (bweight > 0.0) ? vec4(colorEdgeBWeight.rgb, bweight) : color; | ||||
| color = ((edge_flag & EDGE_SEAM) != 0) ? colorEdgeSeam : color; | color = ((edge_flag & EDGE_SEAM) != 0) ? colorEdgeSeam : color; | ||||
| return color; | return color; | ||||
| } | } | ||||
| vec4 EDIT_MESH_edge_color_inner(int edge_flag) | vec4 EDIT_MESH_edge_color_inner(int edge_flag) | ||||
| { | { | ||||
| vec4 color = colorWireEdit; | vec4 color = colorWireEdit; | ||||
| vec4 color_select = (selectEdges) ? colorEdgeSelect : colorFaceSelect; | vec4 color_select = (selectEdges) ? colorEdgeSelect : mix(colorEdgeSelect, colorWireEdit, .55); | ||||
| color = (doEdges && ((edge_flag & EDGE_SELECTED) != 0)) ? color_select : color; | color = (doEdges && ((edge_flag & EDGE_SELECTED) != 0)) ? color_select : color; | ||||
| color = (doEdges && ((edge_flag & EDGE_ACTIVE) != 0)) ? colorEditMeshActive : color; | color = (doEdges && ((edge_flag & EDGE_ACTIVE) != 0)) ? colorEditMeshActive : color; | ||||
| float non_edge_select_alpha = (selectFaces && (edge_flag & EDGE_SELECTED) != 0) ? 0.75 : 0.4; | float non_edge_select_alpha = (selectFaces && (edge_flag & EDGE_SELECTED) != 0) ? 0.75 : 0.4; | ||||
| color.a = (selectEdges) ? 1.0 : non_edge_select_alpha; | color.a = (selectEdges) ? 1.0 : non_edge_select_alpha; | ||||
| return color; | return color; | ||||
| } | } | ||||
| vec4 EDIT_MESH_edge_vertex_color(int vertex_flag) | vec4 EDIT_MESH_edge_vertex_color(int vertex_flag) | ||||
| { | { | ||||
| vec4 color = colorWireEdit; | vec4 color = colorWireEdit; | ||||
| vec4 color_select = (selectEdges) ? colorEdgeSelect : colorFaceSelect; | vec4 color_select = (selectEdges) ? colorEdgeSelect : mix(colorEdgeSelect, colorWireEdit, .55); | ||||
| color = (doEdges && (vertex_flag & (VERT_ACTIVE | VERT_SELECTED)) != 0) ? color_select : color; | color = (doEdges && (vertex_flag & (VERT_ACTIVE | VERT_SELECTED)) != 0) ? color_select : color; | ||||
| color.a = (selectEdges) ? 1.0 : 0.4; | color.a = (selectEdges) ? 1.0 : 0.4; | ||||
| return color; | return color; | ||||
| } | } | ||||
| vec4 EDIT_MESH_vertex_color(int vertex_flag) | vec4 EDIT_MESH_vertex_color(int vertex_flag) | ||||
| { | { | ||||
| if ((vertex_flag & VERT_ACTIVE) != 0) { | if ((vertex_flag & VERT_ACTIVE) != 0) { | ||||
| Show All 35 Lines | |||||