diff options
Diffstat (limited to 'source/blender/draw/modes/edit_mesh_mode.c')
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index d599e390ca7..9afb9ce40a0 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -197,6 +197,7 @@ static void EDIT_MESH_engine_init(void *vedata) geom_sh_code[0] = NULL; } const char *use_geom_def = use_geom_shader ? "#define USE_GEOM_SHADER\n" : ""; + const char *use_smooth_def = (U.uiflag2 & USER_EDIT_MODE_SMOOTH_WIRE) ? "#define USE_SMOOTH_WIRE\n" : ""; sh_data->overlay_face = GPU_shader_create_from_arrays({ .vert = (const char *[]){lib, datatoc_edit_mesh_overlay_vert_glsl, NULL}, .frag = (const char *[]){datatoc_gpu_shader_3D_smooth_color_frag_glsl, NULL}, @@ -205,13 +206,13 @@ static void EDIT_MESH_engine_init(void *vedata) sh_data->overlay_edge = GPU_shader_create_from_arrays({ .vert = (const char *[]){lib, datatoc_edit_mesh_overlay_vert_glsl, NULL}, .frag = (const char *[]){lib, datatoc_edit_mesh_overlay_frag_glsl, NULL}, - .defs = (const char *[]){sh_cfg_data->def, use_geom_def, "#define EDGE\n", NULL}, + .defs = (const char *[]){sh_cfg_data->def, use_geom_def, use_smooth_def, "#define EDGE\n", NULL}, .geom = (use_geom_shader) ? geom_sh_code : NULL, }); sh_data->overlay_edge_flat = GPU_shader_create_from_arrays({ .vert = (const char *[]){lib, datatoc_edit_mesh_overlay_vert_glsl, NULL}, .frag = (const char *[]){lib, datatoc_edit_mesh_overlay_frag_glsl, NULL}, - .defs = (const char *[]){sh_cfg_data->def, use_geom_def, "#define EDGE\n", "#define FLAT\n", NULL}, + .defs = (const char *[]){sh_cfg_data->def, use_geom_def, use_smooth_def, "#define EDGE\n", "#define FLAT\n", NULL}, .geom = (use_geom_shader) ? geom_sh_code : NULL, }); sh_data->overlay_vert = GPU_shader_create_from_arrays({ |