Files
test2/source/blender/gpu/shaders/gpu_shader_sequencer_thumbs_frag.glsl
Clément Foucault fe213f80a4 GPU: Shader: Make info files generated
This is the first step of moving the create infos
back inside shader sources.

All info files are now treated as source files.
However, they are not considered in the include tree
yet. This will come in another following PR.

Each shader source file now generate a `.info` file
containing only the create info declarations.

This renames all info files so that they do not
conflict with their previous versions that were
copied (non-generated).

Pull Request: https://projects.blender.org/blender/blender/pulls/146676
2025-09-25 10:57:02 +02:00

39 lines
906 B
GLSL

/* 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"
FRAGMENT_SHADER_CREATE_INFO(gpu_shader_sequencer_thumbs)
void main()
{
SeqStripThumbData thumb = thumb_data[thumb_id];
float2 pos1, pos2, size, center, pos;
float radius = 0.0f;
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;
/* Outside of strip rounded rectangle? */
float sdf = sdf_rounded_box(pos - center, size, radius);
if (sdf > 0.0f) {
col = float4(0.0f);
}
fragColor = col;
}