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
path: root/source
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2022-01-10 14:51:01 +0300
committerJeroen Bakker <jeroen@blender.org>2022-01-10 14:51:21 +0300
commitf5e90a943f1150a067ca4334b4852c3a62df1597 (patch)
tree160634a1b05b2698b37501395f19903673ec16cb /source
parent8a772645e2987327bb74c8858252800e62e0296b (diff)
Remove GPU_SHADER_2D_POINT_FIXED_SIZE_UNIFORM_COLOR.
Shader isn't used and not accessible via py-api.
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/CMakeLists.txt1
-rw-r--r--source/blender/gpu/GPU_shader.h8
-rw-r--r--source/blender/gpu/intern/gpu_shader_builtin.c7
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_uniform_color_frag.glsl18
-rw-r--r--source/blender/gpu/tests/gpu_shader_builtin_test.cc2
5 files changed, 0 insertions, 36 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 4b98359eff6..2987709c875 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -245,7 +245,6 @@ data_to_c_simple(shaders/gpu_shader_3D_clipped_uniform_color_vert.glsl SRC)
data_to_c_simple(shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl SRC)
-data_to_c_simple(shaders/gpu_shader_point_uniform_color_frag.glsl SRC)
data_to_c_simple(shaders/gpu_shader_point_uniform_color_aa_frag.glsl SRC)
data_to_c_simple(shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl SRC)
data_to_c_simple(shaders/gpu_shader_point_varying_color_varying_outline_aa_frag.glsl SRC)
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index 2ac1e5dd553..f36c8f99064 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -294,14 +294,6 @@ typedef enum eGPUBuiltinShader {
GPU_SHADER_3D_IMAGE_MODULATE_ALPHA,
/* points */
/**
- * Draw round points with a hardcoded size.
- * Take a single color for all the vertices and a 2D position for each vertex.
- *
- * \param color: uniform vec4
- * \param pos: in vec2
- */
- GPU_SHADER_2D_POINT_FIXED_SIZE_UNIFORM_COLOR,
- /**
* Draw round points with a constant size.
* Take a single color for all the vertices and a 2D 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 695ea440316..24ca691be78 100644
--- a/source/blender/gpu/intern/gpu_shader_builtin.c
+++ b/source/blender/gpu/intern/gpu_shader_builtin.c
@@ -93,7 +93,6 @@ extern char datatoc_gpu_shader_3D_clipped_uniform_color_vert_glsl[];
extern char datatoc_gpu_shader_instance_variying_size_variying_color_vert_glsl[];
-extern char datatoc_gpu_shader_point_uniform_color_frag_glsl[];
extern char datatoc_gpu_shader_point_uniform_color_aa_frag_glsl[];
extern char datatoc_gpu_shader_point_uniform_color_outline_aa_frag_glsl[];
extern char datatoc_gpu_shader_point_varying_color_varying_outline_aa_frag_glsl[];
@@ -331,12 +330,6 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = {
.frag = datatoc_gpu_shader_2D_line_dashed_frag_glsl,
},
- [GPU_SHADER_2D_POINT_FIXED_SIZE_UNIFORM_COLOR] =
- {
- .name = "GPU_SHADER_2D_POINT_FIXED_SIZE_UNIFORM_COLOR",
- .vert = datatoc_gpu_shader_2D_vert_glsl,
- .frag = datatoc_gpu_shader_point_uniform_color_frag_glsl,
- },
[GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA] =
{
.name = "GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA",
diff --git a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_frag.glsl
deleted file mode 100644
index 692320bea93..00000000000
--- a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_frag.glsl
+++ /dev/null
@@ -1,18 +0,0 @@
-
-uniform vec4 color;
-
-out vec4 fragColor;
-
-void main()
-{
- vec2 centered = gl_PointCoord - vec2(0.5);
- float dist_squared = dot(centered, centered);
- const float rad_squared = 0.25;
-
- // round point with jaggy edges
- if (dist_squared > rad_squared) {
- discard;
- }
-
- fragColor = color;
-}
diff --git a/source/blender/gpu/tests/gpu_shader_builtin_test.cc b/source/blender/gpu/tests/gpu_shader_builtin_test.cc
index db1967de5c5..6d6a772f5fb 100644
--- a/source/blender/gpu/tests/gpu_shader_builtin_test.cc
+++ b/source/blender/gpu/tests/gpu_shader_builtin_test.cc
@@ -52,8 +52,6 @@ static void test_shader_builtin()
test_compile_builtin_shader(GPU_SHADER_2D_IMAGE_OVERLAYS_MERGE, GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_2D_IMAGE_OVERLAYS_STEREO_MERGE, GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_2D_IMAGE_SHUFFLE_COLOR, GPU_SHADER_CFG_DEFAULT);
- test_compile_builtin_shader(GPU_SHADER_2D_POINT_FIXED_SIZE_UNIFORM_COLOR,
- GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA,
GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA,