Files
test2/source/blender/gpu/shaders/gpu_shader_sequencer_thumbs_frag.glsl

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
906 B
Plaintext
Raw Normal View History

2024-09-03 08:25:15 +02:00
/* SPDX-FileCopyrightText: 2024 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#include "infos/gpu_shader_sequencer_infos.hh"
#include "gpu_shader_sequencer_lib.glsl"
2024-09-03 08:25:15 +02:00
FRAGMENT_SHADER_CREATE_INFO(gpu_shader_sequencer_thumbs)
2024-09-03 08:25:15 +02:00
void main()
{
SeqStripThumbData thumb = thumb_data[thumb_id];
float2 pos1, pos2, size, center, pos;
float radius = 0.0f;
2024-09-03 08:25:15 +02:00
strip_box(thumb.left,
thumb.right,
thumb.bottom,
thumb.top,
pos_interp,
pos1,
pos2,
size,
center,
pos,
radius);
/* Sample thumbnail texture, modulate with color. */
float4 col = texture(image, texCoord_interp) * thumb.tint_color;
2024-09-03 08:25:15 +02:00
/* Outside of strip rounded rectangle? */
float sdf = sdf_rounded_box(pos - center, size, radius);
if (sdf > 0.0f) {
col = float4(0.0f);
2024-09-03 08:25:15 +02:00
}
fragColor = col;
}