Remove GPU_SHADER_2D_POINT_UNIFORM_SIZE_VARYING_COLOR_OUTLINE_AA.
Shader isn't used and not accessible via py-api.
This commit is contained in:
parent
6669431846
commit
1b57dcf320
|
@ -248,7 +248,6 @@ data_to_c_simple(shaders/gpu_shader_instance_variying_size_variying_color_vert.g
|
|||
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_outline_aa_frag.glsl SRC)
|
||||
data_to_c_simple(shaders/gpu_shader_point_varying_color_varying_outline_aa_frag.glsl SRC)
|
||||
data_to_c_simple(shaders/gpu_shader_point_varying_color_frag.glsl SRC)
|
||||
data_to_c_simple(shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl SRC)
|
||||
|
@ -257,7 +256,6 @@ data_to_c_simple(shaders/gpu_shader_3D_point_uniform_size_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)
|
||||
data_to_c_simple(shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl SRC)
|
||||
|
||||
data_to_c_simple(shaders/gpu_shader_text_vert.glsl SRC)
|
||||
data_to_c_simple(shaders/gpu_shader_text_frag.glsl SRC)
|
||||
|
|
|
@ -321,17 +321,6 @@ typedef enum eGPUBuiltinShader {
|
|||
* \param pos: in vec2
|
||||
*/
|
||||
GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA,
|
||||
/**
|
||||
* Draw round points with a constant size and an outline.
|
||||
* Take a 2D position and a color for each vertex.
|
||||
*
|
||||
* \param size: uniform float
|
||||
* \param outlineWidth: uniform float
|
||||
* \param outlineColor: uniform vec4
|
||||
* \param color: in vec4
|
||||
* \param pos: in vec2
|
||||
*/
|
||||
GPU_SHADER_2D_POINT_UNIFORM_SIZE_VARYING_COLOR_OUTLINE_AA,
|
||||
/**
|
||||
* Draw round points with a constant size and an outline.
|
||||
* Take a 2D position and a color for each vertex.
|
||||
|
|
|
@ -96,7 +96,6 @@ 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_outline_aa_frag_glsl[];
|
||||
extern char datatoc_gpu_shader_point_varying_color_varying_outline_aa_frag_glsl[];
|
||||
extern char datatoc_gpu_shader_point_varying_color_frag_glsl[];
|
||||
extern char datatoc_gpu_shader_3D_point_fixed_size_varying_color_vert_glsl[];
|
||||
|
@ -105,7 +104,6 @@ extern char datatoc_gpu_shader_3D_point_uniform_size_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[];
|
||||
extern char datatoc_gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert_glsl[];
|
||||
|
||||
extern char datatoc_gpu_shader_2D_line_dashed_uniform_color_vert_glsl[];
|
||||
extern char datatoc_gpu_shader_2D_line_dashed_frag_glsl[];
|
||||
|
@ -358,12 +356,6 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = {
|
|||
.vert = datatoc_gpu_shader_2D_point_uniform_size_outline_aa_vert_glsl,
|
||||
.frag = datatoc_gpu_shader_point_uniform_color_outline_aa_frag_glsl,
|
||||
},
|
||||
[GPU_SHADER_2D_POINT_UNIFORM_SIZE_VARYING_COLOR_OUTLINE_AA] =
|
||||
{
|
||||
.name = "GPU_SHADER_2D_POINT_UNIFORM_SIZE_VARYING_COLOR_OUTLINE_AA",
|
||||
.vert = datatoc_gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert_glsl,
|
||||
.frag = datatoc_gpu_shader_point_varying_color_outline_aa_frag_glsl,
|
||||
},
|
||||
[GPU_SHADER_3D_POINT_FIXED_SIZE_VARYING_COLOR] =
|
||||
{
|
||||
.name = "GPU_SHADER_3D_POINT_FIXED_SIZE_VARYING_COLOR",
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform float size;
|
||||
uniform float outlineWidth;
|
||||
|
||||
in vec2 pos;
|
||||
in vec4 color;
|
||||
out vec4 radii;
|
||||
out vec4 fillColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
|
||||
gl_PointSize = size;
|
||||
fillColor = color;
|
||||
|
||||
/* 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;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
|
||||
uniform vec4 outlineColor;
|
||||
|
||||
in vec4 radii;
|
||||
in vec4 fillColor;
|
||||
out vec4 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
float dist = length(gl_PointCoord - vec2(0.5));
|
||||
|
||||
/* transparent outside of point
|
||||
* --- 0 ---
|
||||
* smooth transition
|
||||
* --- 1 ---
|
||||
* pure outline color
|
||||
* --- 2 ---
|
||||
* smooth transition
|
||||
* --- 3 ---
|
||||
* pure fill color
|
||||
* ...
|
||||
* dist = 0 at center of point */
|
||||
|
||||
float midStroke = 0.5 * (radii[1] + radii[2]);
|
||||
|
||||
if (dist > midStroke) {
|
||||
fragColor.rgb = outlineColor.rgb;
|
||||
fragColor.a = mix(outlineColor.a, 0.0, smoothstep(radii[1], radii[0], dist));
|
||||
}
|
||||
else {
|
||||
fragColor = mix(fillColor, outlineColor, smoothstep(radii[3], radii[2], dist));
|
||||
}
|
||||
}
|
|
@ -54,8 +54,6 @@ static void test_shader_builtin()
|
|||
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_VARYING_COLOR_OUTLINE_AA,
|
||||
GPU_SHADER_CFG_DEFAULT);
|
||||
test_compile_builtin_shader(GPU_SHADER_2D_POINT_VARYING_SIZE_VARYING_COLOR,
|
||||
GPU_SHADER_CFG_DEFAULT);
|
||||
test_compile_builtin_shader(GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA,
|
||||
|
|
Loading…
Reference in New Issue