Cleanup: Remove unused source files.
This commit is contained in:
parent
3488339475
commit
cfb3f5062d
|
@ -261,13 +261,6 @@ 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_2D_edituvs_points_vert.glsl SRC)
|
||||
data_to_c_simple(shaders/gpu_shader_2D_edituvs_facedots_vert.glsl SRC)
|
||||
data_to_c_simple(shaders/gpu_shader_2D_edituvs_edges_vert.glsl SRC)
|
||||
data_to_c_simple(shaders/gpu_shader_2D_edituvs_edges_frag.glsl SRC)
|
||||
data_to_c_simple(shaders/gpu_shader_2D_edituvs_faces_vert.glsl SRC)
|
||||
data_to_c_simple(shaders/gpu_shader_2D_edituvs_stretch_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)
|
||||
data_to_c_simple(shaders/gpu_shader_keyframe_shape_vert.glsl SRC)
|
||||
|
|
|
@ -109,13 +109,6 @@ 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_edituvs_points_vert_glsl[];
|
||||
extern char datatoc_gpu_shader_2D_edituvs_facedots_vert_glsl[];
|
||||
extern char datatoc_gpu_shader_2D_edituvs_edges_vert_glsl[];
|
||||
extern char datatoc_gpu_shader_2D_edituvs_edges_frag_glsl[];
|
||||
extern char datatoc_gpu_shader_2D_edituvs_faces_vert_glsl[];
|
||||
extern char datatoc_gpu_shader_2D_edituvs_stretch_vert_glsl[];
|
||||
|
||||
extern char datatoc_gpu_shader_2D_line_dashed_uniform_color_vert_glsl[];
|
||||
extern char datatoc_gpu_shader_2D_line_dashed_frag_glsl[];
|
||||
extern char datatoc_gpu_shader_3D_line_dashed_uniform_color_vert_glsl[];
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
|
||||
|
||||
uniform float dashWidth;
|
||||
|
||||
#ifdef SMOOTH_COLOR
|
||||
noperspective in vec4 finalColor;
|
||||
#else
|
||||
flat in vec4 finalColor;
|
||||
#endif
|
||||
|
||||
noperspective in vec2 stipple_pos;
|
||||
flat in vec2 stipple_start;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = finalColor;
|
||||
|
||||
/* Avoid passing viewport size */
|
||||
vec2 dd = fwidth(stipple_pos);
|
||||
|
||||
float dist = distance(stipple_start, stipple_pos) / max(dd.x, dd.y);
|
||||
|
||||
if (fract(dist / dashWidth) > 0.5) {
|
||||
fragColor.rgb = vec3(0.0);
|
||||
}
|
||||
|
||||
fragColor = blender_srgb_to_framebuffer_space(fragColor);
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform vec4 edgeColor;
|
||||
uniform vec4 selectColor;
|
||||
|
||||
in vec2 pos;
|
||||
in int flag;
|
||||
|
||||
#ifdef SMOOTH_COLOR
|
||||
noperspective out vec4 finalColor;
|
||||
#else
|
||||
flat out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
noperspective out vec2 stipple_pos;
|
||||
flat out vec2 stipple_start;
|
||||
|
||||
/* TODO: Port drawing to draw manager and
|
||||
* remove constants duplications. */
|
||||
#define VERT_UV_SELECT (1 << 3)
|
||||
#define EDGE_UV_SELECT (1 << 5)
|
||||
|
||||
void main()
|
||||
{
|
||||
#ifdef SMOOTH_COLOR
|
||||
bool is_select = (flag & VERT_UV_SELECT) != 0;
|
||||
#else
|
||||
bool is_select = (flag & EDGE_UV_SELECT) != 0;
|
||||
#endif
|
||||
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
|
||||
gl_Position.z = float(!is_select);
|
||||
|
||||
/* Avoid precision loss. */
|
||||
stipple_start = stipple_pos = 500.0 + 500.0 * (gl_Position.xy / gl_Position.w);
|
||||
|
||||
finalColor = (is_select) ? selectColor : edgeColor;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform vec4 vertColor;
|
||||
uniform vec4 selectColor;
|
||||
|
||||
in vec2 pos;
|
||||
in int flag;
|
||||
|
||||
out vec4 finalColor;
|
||||
|
||||
/* TODO: Port drawing to draw manager and
|
||||
* remove constants duplications. */
|
||||
#define FACE_UV_SELECT (1 << 7)
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
|
||||
finalColor = ((flag & FACE_UV_SELECT) != 0) ? selectColor : vertColor;
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform vec4 faceColor;
|
||||
uniform vec4 selectColor;
|
||||
uniform vec4 activeColor;
|
||||
|
||||
in vec2 pos;
|
||||
in int flag;
|
||||
|
||||
flat out vec4 finalColor;
|
||||
|
||||
/* TODO: Port drawing to draw manager and
|
||||
* remove constants duplications. */
|
||||
#define FACE_UV_ACTIVE (1 << 6)
|
||||
#define FACE_UV_SELECT (1 << 7)
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
|
||||
|
||||
bool is_selected = (flag & FACE_UV_SELECT) != 0;
|
||||
bool is_active = (flag & FACE_UV_ACTIVE) != 0;
|
||||
|
||||
finalColor = (is_selected) ? selectColor : faceColor;
|
||||
finalColor = (is_active) ? activeColor : finalColor;
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform vec4 vertColor;
|
||||
uniform vec4 selectColor;
|
||||
uniform vec4 pinnedColor;
|
||||
uniform float pointSize;
|
||||
uniform float outlineWidth;
|
||||
|
||||
in vec2 pos;
|
||||
in int flag;
|
||||
|
||||
out vec4 fillColor;
|
||||
out vec4 outlineColor;
|
||||
out vec4 radii;
|
||||
|
||||
/* TODO: Port drawing to draw manager and
|
||||
* remove constants duplications. */
|
||||
#define VERT_UV_SELECT (1 << 3)
|
||||
#define VERT_UV_PINNED (1 << 4)
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
|
||||
gl_PointSize = pointSize;
|
||||
|
||||
bool is_selected = (flag & VERT_UV_SELECT) != 0;
|
||||
bool is_pinned = (flag & VERT_UV_PINNED) != 0;
|
||||
|
||||
vec4 deselect_col = (is_pinned) ? pinnedColor : vertColor;
|
||||
fillColor = (is_selected) ? selectColor : deselect_col;
|
||||
outlineColor = (is_pinned) ? pinnedColor : vec4(fillColor.rgb, 0.0);
|
||||
|
||||
/* Calculate concentric radii in pixels. */
|
||||
float radius = 0.5 * pointSize;
|
||||
|
||||
/* 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 /= pointSize;
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform vec2 aspect;
|
||||
|
||||
in vec2 pos;
|
||||
|
||||
#ifdef STRETCH_ANGLE
|
||||
in vec2 uv_angles;
|
||||
in float angle;
|
||||
|
||||
#else
|
||||
in float ratio;
|
||||
uniform float totalAreaRatio;
|
||||
uniform float totalAreaRatioInv;
|
||||
|
||||
#endif
|
||||
|
||||
noperspective out vec4 finalColor;
|
||||
|
||||
vec3 weight_to_rgb(float weight)
|
||||
{
|
||||
vec3 r_rgb;
|
||||
float blend = ((weight / 2.0) + 0.5);
|
||||
|
||||
if (weight <= 0.25) { /* blue->cyan */
|
||||
r_rgb[0] = 0.0;
|
||||
r_rgb[1] = blend * weight * 4.0;
|
||||
r_rgb[2] = blend;
|
||||
}
|
||||
else if (weight <= 0.50) { /* cyan->green */
|
||||
r_rgb[0] = 0.0;
|
||||
r_rgb[1] = blend;
|
||||
r_rgb[2] = blend * (1.0 - ((weight - 0.25) * 4.0));
|
||||
}
|
||||
else if (weight <= 0.75) { /* green->yellow */
|
||||
r_rgb[0] = blend * ((weight - 0.50) * 4.0);
|
||||
r_rgb[1] = blend;
|
||||
r_rgb[2] = 0.0;
|
||||
}
|
||||
else if (weight <= 1.0) { /* yellow->red */
|
||||
r_rgb[0] = blend;
|
||||
r_rgb[1] = blend * (1.0 - ((weight - 0.75) * 4.0));
|
||||
r_rgb[2] = 0.0;
|
||||
}
|
||||
else {
|
||||
/* exceptional value, unclamped or nan,
|
||||
* avoid uninitialized memory use */
|
||||
r_rgb[0] = 1.0;
|
||||
r_rgb[1] = 0.0;
|
||||
r_rgb[2] = 1.0;
|
||||
}
|
||||
|
||||
return r_rgb;
|
||||
}
|
||||
|
||||
#define M_PI 3.1415926535897932
|
||||
|
||||
vec2 angle_to_v2(float angle)
|
||||
{
|
||||
return vec2(cos(angle), sin(angle));
|
||||
}
|
||||
|
||||
/* Adapted from BLI_math_vector.h */
|
||||
float angle_normalized_v2v2(vec2 v1, vec2 v2)
|
||||
{
|
||||
v1 = normalize(v1 * aspect);
|
||||
v2 = normalize(v2 * aspect);
|
||||
/* this is the same as acos(dot_v3v3(v1, v2)), but more accurate */
|
||||
bool q = (dot(v1, v2) >= 0.0);
|
||||
vec2 v = (q) ? (v1 - v2) : (v1 + v2);
|
||||
float a = 2.0 * asin(length(v) / 2.0);
|
||||
return (q) ? a : M_PI - a;
|
||||
}
|
||||
|
||||
float area_ratio_to_stretch(float ratio, float tot_ratio, float inv_tot_ratio)
|
||||
{
|
||||
ratio *= (ratio > 0.0f) ? tot_ratio : -inv_tot_ratio;
|
||||
return (ratio > 1.0f) ? (1.0f / ratio) : ratio;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
|
||||
|
||||
#ifdef STRETCH_ANGLE
|
||||
vec2 v1 = angle_to_v2(uv_angles.x * M_PI);
|
||||
vec2 v2 = angle_to_v2(uv_angles.y * M_PI);
|
||||
float uv_angle = angle_normalized_v2v2(v1, v2) / M_PI;
|
||||
float stretch = 1.0 - abs(uv_angle - angle);
|
||||
stretch = stretch;
|
||||
stretch = 1.0 - stretch * stretch;
|
||||
#else
|
||||
float stretch = 1.0 - area_ratio_to_stretch(ratio, totalAreaRatio, totalAreaRatioInv);
|
||||
|
||||
#endif
|
||||
|
||||
finalColor = vec4(weight_to_rgb(stretch), 1.0);
|
||||
}
|
Loading…
Reference in New Issue