Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/shaders/wireframe_vert.glsl
| Show All 22 Lines | |||||
| { | { | ||||
| return ((wd == 0.0) ? -1.5 : wd) + wireStepParam; | return ((wd == 0.0) ? -1.5 : wd) + wireStepParam; | ||||
| } | } | ||||
| void wire_color_get(out vec3 rim_col, out vec3 wire_col) | void wire_color_get(out vec3 rim_col, out vec3 wire_col) | ||||
| { | { | ||||
| int flag = int(abs(ObjectInfo.w)); | int flag = int(abs(ObjectInfo.w)); | ||||
| bool is_selected = (flag & DRW_BASE_SELECTED) != 0; | bool is_selected = (flag & DRW_BASE_SELECTED) != 0; | ||||
| bool is_from_dupli = (flag & DRW_BASE_FROM_DUPLI) != 0; | |||||
| bool is_from_set = (flag & DRW_BASE_FROM_SET) != 0; | bool is_from_set = (flag & DRW_BASE_FROM_SET) != 0; | ||||
| bool is_active = (flag & DRW_BASE_ACTIVE) != 0; | bool is_active = (flag & DRW_BASE_ACTIVE) != 0; | ||||
| if (is_from_set) { | if (is_from_set) { | ||||
| rim_col = colorDupli.rgb; | rim_col = colorWire.rgb; | ||||
| wire_col = colorDupli.rgb; | wire_col = colorWire.rgb; | ||||
| } | |||||
| else if (is_from_dupli) { | |||||
| if (is_selected) { | |||||
| if (isTransform) { | |||||
| rim_col = colorTransform.rgb; | |||||
| } | |||||
| else { | |||||
| rim_col = colorDupliSelect.rgb; | |||||
| } | |||||
| } | |||||
| else { | |||||
| rim_col = colorDupli.rgb; | |||||
| } | |||||
| wire_col = colorDupli.rgb; | |||||
| } | } | ||||
| else if (is_selected && useColoring) { | else if (is_selected && useColoring) { | ||||
| if (isTransform) { | if (isTransform) { | ||||
| rim_col = colorTransform.rgb; | rim_col = colorTransform.rgb; | ||||
| } | } | ||||
| else if (is_active) { | else if (is_active) { | ||||
| rim_col = colorActive.rgb; | rim_col = colorActive.rgb; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines | |||||