Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/shaders/wireframe_vert.glsl
| Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | #ifndef SELECT_EDGES | ||||
| finalColor = mix(final_rim_col, final_front_col, facing); | finalColor = mix(final_rim_col, final_front_col, facing); | ||||
| #endif | #endif | ||||
| /* Cull flat edges below threshold. */ | /* Cull flat edges below threshold. */ | ||||
| if (get_edge_sharpness(wd) < 0.0) { | if (get_edge_sharpness(wd) < 0.0) { | ||||
| edgeStart = vec2(-1.0); | edgeStart = vec2(-1.0); | ||||
| } | } | ||||
| #ifdef SELECT_EDGES | |||||
| /* HACK: to avoid loosing sub pixel object in selections, we add a bit of randomness to the | |||||
| * wire to at least create one fragment that will pass the occlusion query. */ | |||||
| gl_Position.xy += sizeViewportInv.xy * gl_Position.w * ((gl_VertexID % 2 == 0) ? -1.0 : 1.0); | |||||
| #endif | |||||
| #ifdef USE_WORLD_CLIP_PLANES | #ifdef USE_WORLD_CLIP_PLANES | ||||
| world_clip_planes_calc_clip_distance(wpos); | world_clip_planes_calc_clip_distance(wpos); | ||||
| #endif | #endif | ||||
| } | } | ||||