Previously selected strips in VSE timeline were drawing their outline 1px outside of the strip boundaries. This makes outlines of the strips overlap each other when neighboring strips are selected. Now the selected outline is fully within regular strip shape. Pull Request: https://projects.blender.org/blender/blender/pulls/122890
34 lines
734 B
GLSL
34 lines
734 B
GLSL
/* SPDX-FileCopyrightText: 2024 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
void main()
|
|
{
|
|
int id = gl_InstanceID;
|
|
strip_id = id;
|
|
int vid = gl_VertexID;
|
|
SeqStripDrawData strip = strip_data[id];
|
|
vec4 rect = vec4(strip.left_handle, strip.bottom, strip.right_handle, strip.top);
|
|
/* Expand by 2px to fit possible pixel grid rounding. */
|
|
vec2 expand = vec2(context_data.pixelx, context_data.pixely);
|
|
rect.xy -= expand;
|
|
rect.zw += expand;
|
|
|
|
vec2 co;
|
|
if (vid == 0) {
|
|
co = rect.xw;
|
|
}
|
|
else if (vid == 1) {
|
|
co = rect.xy;
|
|
}
|
|
else if (vid == 2) {
|
|
co = rect.zw;
|
|
}
|
|
else {
|
|
co = rect.zy;
|
|
}
|
|
|
|
co_interp = co;
|
|
gl_Position = ModelViewProjectionMatrix * vec4(co, 0.0f, 1.0f);
|
|
}
|