diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-10 02:57:42 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-10 13:25:16 +0300 |
commit | 632e0725d27271f95073f668a24bcf06f603f001 (patch) | |
tree | 6980992db3d05f25aff27646bad1e3a01827153b /source/blender/draw/modes/edit_mesh_mode.c | |
parent | 6006f86e07c5732f72015d500ce3e066464e2baa (diff) |
Overlays: Use common_view_lib.glsl
This removes ModelViewProjectionMatrix usage
Diffstat (limited to 'source/blender/draw/modes/edit_mesh_mode.c')
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 655b0428743..c68a3cb604d 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -198,6 +198,7 @@ static void EDIT_MESH_engine_init(void *vedata) sh_data->weight_face = GPU_shader_create_from_arrays({ .vert = (const char *[]){sh_cfg_data->lib, datatoc_common_globals_lib_glsl, + datatoc_common_view_lib_glsl, datatoc_paint_weight_vert_glsl, NULL}, .frag = (const char *[]){datatoc_common_globals_lib_glsl, @@ -290,24 +291,20 @@ static void EDIT_MESH_engine_init(void *vedata) .defs = (const char *[]){sh_cfg_data->def, NULL}, }); - MEM_freeN(lib); - /* Mesh Analysis */ sh_data->mesh_analysis_face = GPU_shader_create_from_arrays({ - .vert = (const char *[]){sh_cfg_data->lib, - datatoc_edit_mesh_overlay_mesh_analysis_vert_glsl, - NULL}, + .vert = (const char *[]){lib, datatoc_edit_mesh_overlay_mesh_analysis_vert_glsl, NULL}, .frag = (const char *[]){datatoc_edit_mesh_overlay_mesh_analysis_frag_glsl, NULL}, .defs = (const char *[]){sh_cfg_data->def, "#define FACE_COLOR\n", NULL}, }); sh_data->mesh_analysis_vertex = GPU_shader_create_from_arrays({ - .vert = (const char *[]){sh_cfg_data->lib, - datatoc_edit_mesh_overlay_mesh_analysis_vert_glsl, - NULL}, + .vert = (const char *[]){lib, datatoc_edit_mesh_overlay_mesh_analysis_vert_glsl, NULL}, .frag = (const char *[]){datatoc_edit_mesh_overlay_mesh_analysis_frag_glsl, NULL}, .defs = (const char *[]){sh_cfg_data->def, "#define VERTEX_COLOR\n", NULL}, }); + MEM_freeN(lib); + sh_data->depth = DRW_shader_create_3d_depth_only(draw_ctx->sh_cfg); } } |