[Bf-blender-cvs] [f813aab7873] master: Remove GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA.

Jeroen Bakker noreply at git.blender.org
Mon Jan 10 12:56:31 CET 2022


Commit: f813aab787376be0c9649d0480d84f1aa6332371
Author: Jeroen Bakker
Date:   Mon Jan 10 12:37:42 2022 +0100
Branches: master
https://developer.blender.org/rBf813aab787376be0c9649d0480d84f1aa6332371

Remove GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA.

Shader isn't used and isn't accessible via py-api.

===================================================================

M	source/blender/gpu/CMakeLists.txt
M	source/blender/gpu/GPU_shader.h
M	source/blender/gpu/intern/gpu_shader_builtin.c
D	source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl
M	source/blender/gpu/tests/gpu_shader_builtin_test.cc

===================================================================

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);



More information about the Bf-blender-cvs mailing list