From f813aab787376be0c9649d0480d84f1aa6332371 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 10 Jan 2022 12:37:42 +0100 Subject: Remove GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA. Shader isn't used and isn't accessible via py-api. --- source/blender/gpu/CMakeLists.txt | 1 - source/blender/gpu/GPU_shader.h | 11 -------- source/blender/gpu/intern/gpu_shader_builtin.c | 8 ------ ...ader_3D_point_uniform_size_outline_aa_vert.glsl | 33 ---------------------- .../blender/gpu/tests/gpu_shader_builtin_test.cc | 1 - 5 files changed, 54 deletions(-) delete mode 100644 source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl (limited to 'source') diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index 83d83882d94..998244c085e 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -255,7 +255,6 @@ data_to_c_simple(shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl data_to_c_simple(shaders/gpu_shader_3D_point_varying_size_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl SRC) -data_to_c_simple(shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl SRC) diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index 7ea34b257c0..38f39639866 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -366,17 +366,6 @@ typedef enum eGPUBuiltinShader { * \param pos: in vec3 */ GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA, - /** - * Draw round points with a constant size and an outline. - * Take a single color for all the vertices and a 3D position for each vertex. - * - * \param size: uniform float - * \param outlineWidth: uniform float - * \param color: uniform vec4 - * \param outlineColor: uniform vec4 - * \param pos: in vec3 - */ - GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA, /** * Draw round points with a constant size and an outline. * Take a single color for all the vertices and a 3D position for each vertex. diff --git a/source/blender/gpu/intern/gpu_shader_builtin.c b/source/blender/gpu/intern/gpu_shader_builtin.c index 6efa31f41dd..076c89c8795 100644 --- a/source/blender/gpu/intern/gpu_shader_builtin.c +++ b/source/blender/gpu/intern/gpu_shader_builtin.c @@ -103,7 +103,6 @@ extern char datatoc_gpu_shader_3D_point_fixed_size_varying_color_vert_glsl[]; extern char datatoc_gpu_shader_3D_point_varying_size_vert_glsl[]; extern char datatoc_gpu_shader_3D_point_varying_size_varying_color_vert_glsl[]; extern char datatoc_gpu_shader_3D_point_uniform_size_aa_vert_glsl[]; -extern char datatoc_gpu_shader_3D_point_uniform_size_outline_aa_vert_glsl[]; extern char datatoc_gpu_shader_2D_point_varying_size_varying_color_vert_glsl[]; extern char datatoc_gpu_shader_2D_point_uniform_size_aa_vert_glsl[]; extern char datatoc_gpu_shader_2D_point_uniform_size_outline_aa_vert_glsl[]; @@ -396,12 +395,6 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = { .vert = datatoc_gpu_shader_3D_point_uniform_size_aa_vert_glsl, .frag = datatoc_gpu_shader_point_uniform_color_aa_frag_glsl, }, - [GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA] = - { - .name = "GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA", - .vert = datatoc_gpu_shader_3D_point_uniform_size_outline_aa_vert_glsl, - .frag = datatoc_gpu_shader_point_uniform_color_outline_aa_frag_glsl, - }, [GPU_SHADER_INSTANCE_VARIYING_COLOR_VARIYING_SIZE] = { @@ -487,7 +480,6 @@ GPUShader *GPU_shader_get_builtin_shader_with_config(eGPUBuiltinShader shader, GPU_SHADER_3D_SMOOTH_COLOR, GPU_SHADER_3D_DEPTH_ONLY, GPU_SHADER_INSTANCE_VARIYING_COLOR_VARIYING_SIZE, - GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA, GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA, GPU_SHADER_3D_FLAT_COLOR, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR)); diff --git a/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl deleted file mode 100644 index fb5506a778d..00000000000 --- a/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl +++ /dev/null @@ -1,33 +0,0 @@ - -uniform mat4 ModelViewProjectionMatrix; -#ifdef USE_WORLD_CLIP_PLANES -uniform mat4 ModelMatrix; -#endif -uniform float size; -uniform float outlineWidth; - -in vec3 pos; -out vec4 radii; - -void main() -{ - vec4 pos_4d = vec4(pos, 1.0); - gl_Position = ModelViewProjectionMatrix * pos_4d; - gl_PointSize = size; - - /* calculate concentric radii in pixels */ - float radius = 0.5 * size; - - /* start at the outside and progress toward the center */ - radii[0] = radius; - radii[1] = radius - 1.0; - radii[2] = radius - outlineWidth; - radii[3] = radius - outlineWidth - 1.0; - - /* convert to PointCoord units */ - radii /= size; - -#ifdef USE_WORLD_CLIP_PLANES - world_clip_planes_calc_clip_distance((ModelMatrix * pos_4d).xyz); -#endif -} diff --git a/source/blender/gpu/tests/gpu_shader_builtin_test.cc b/source/blender/gpu/tests/gpu_shader_builtin_test.cc index 9e8e057e28a..40b4498dbbf 100644 --- a/source/blender/gpu/tests/gpu_shader_builtin_test.cc +++ b/source/blender/gpu/tests/gpu_shader_builtin_test.cc @@ -29,7 +29,6 @@ static void test_shader_builtin() test_compile_builtin_shader(GPU_SHADER_INSTANCE_VARIYING_COLOR_VARIYING_SIZE); test_compile_builtin_shader(GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR); test_compile_builtin_shader(GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA); - test_compile_builtin_shader(GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA); test_compile_builtin_shader(GPU_SHADER_TEXT, GPU_SHADER_CFG_DEFAULT); test_compile_builtin_shader(GPU_SHADER_KEYFRAME_SHAPE, GPU_SHADER_CFG_DEFAULT); -- cgit v1.2.3