From 1c91b6ee29845c323ffd3f477b56f3a68f4e76be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 10 Jan 2019 22:22:42 +0100 Subject: UVEdit: Port texpaint_loop_wire to batch request This removes code duplication and put an end to the old "create at request" batch creation. Also it uses the same vbo as the uv layer used for shading. Reducing VRAM usage. Also fixes the modified uv display in uv edit mode. --- source/blender/gpu/intern/gpu_shader.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/gpu/intern/gpu_shader.c') diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c index 8a3581c54df..8a141eaa2b2 100644 --- a/source/blender/gpu/intern/gpu_shader.c +++ b/source/blender/gpu/intern/gpu_shader.c @@ -918,6 +918,9 @@ static const GPUShaderStages builtin_shader_stages[GPU_NUM_BUILTIN_SHADERS] = { { datatoc_gpu_shader_2D_nodelink_vert_glsl, datatoc_gpu_shader_2D_nodelink_frag_glsl }, + [GPU_SHADER_2D_UV_UNIFORM_COLOR] = + { datatoc_gpu_shader_2D_vert_glsl, + datatoc_gpu_shader_uniform_color_frag_glsl }, [GPU_SHADER_2D_UV_VERTS] = { datatoc_gpu_shader_2D_edituvs_points_vert_glsl, datatoc_gpu_shader_point_varying_color_varying_outline_aa_frag_glsl }, @@ -1007,6 +1010,9 @@ static const char *gpu_shader_get_builtin_shader_defines( case GPU_SHADER_SIMPLE_LIGHTING_FLAT_COLOR: return "#define USE_FLAT_NORMAL\n"; + case GPU_SHADER_2D_UV_UNIFORM_COLOR: + return "#define UV_POS\n"; + case GPU_SHADER_2D_UV_EDGES_SMOOTH: return "#define SMOOTH_COLOR\n"; -- cgit v1.2.3