Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-22 10:59:52 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-22 11:00:33 +0300
commit2e350b40342f71ecf4173c0e9264f233bdcc4c59 (patch)
tree5ca0de920a410e3d2b1e1725a8a8eb132be0d04f /source/blender/draw/modes/paint_texture_mode.c
parent5bf429b0e43f90b8066576251aa5275b79cdf50d (diff)
Fix T64965: crash using masks in texture paint mode
Diffstat (limited to 'source/blender/draw/modes/paint_texture_mode.c')
-rw-r--r--source/blender/draw/modes/paint_texture_mode.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/draw/modes/paint_texture_mode.c b/source/blender/draw/modes/paint_texture_mode.c
index 847d2d2f8aa..ee8ec78e91b 100644
--- a/source/blender/draw/modes/paint_texture_mode.c
+++ b/source/blender/draw/modes/paint_texture_mode.c
@@ -154,6 +154,16 @@ static void PAINT_TEXTURE_engine_init(void *UNUSED(vedata))
.defs = (const char *[]){sh_cfg_data->def, NULL},
});
+ sh_data->image_mask = GPU_shader_create_from_arrays({
+ .vert = (const char *[]){sh_cfg_data->lib,
+ datatoc_common_globals_lib_glsl,
+ datatoc_common_view_lib_glsl,
+ datatoc_paint_texture_vert_glsl,
+ NULL},
+ .frag = (const char *[]){datatoc_paint_texture_frag_glsl, NULL},
+ .defs = (const char *[]){sh_cfg_data->def, "#define TEXTURE_PAINT_MASK\n", NULL},
+ });
+
sh_data->wire_select_overlay = GPU_shader_create_from_arrays({
.vert = (const char *[]){sh_cfg_data->lib,
datatoc_common_globals_lib_glsl,