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
28 lines
711 B
GLSL
28 lines
711 B
GLSL
/* SPDX-FileCopyrightText: 2025 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "gpu_shader_common_color_utils.glsl"
|
|
#include "infos/gpu_shader_sequencer_infos.hh"
|
|
|
|
FRAGMENT_SHADER_CREATE_INFO(gpu_shader_sequencer_zebra)
|
|
|
|
void main()
|
|
{
|
|
float4 color = texture(image, texCoord_interp);
|
|
if (img_premultiplied) {
|
|
color_alpha_unpremultiply(color, color);
|
|
}
|
|
|
|
fragColor = float4(0.0);
|
|
int phase = int(mod((gl_FragCoord.x + gl_FragCoord.y), 6.0f));
|
|
if (any(greaterThan(color.rgb, float3(zebra_limit)))) {
|
|
if (phase == 4) {
|
|
fragColor = float4(0.0f, 0.0f, 0.0f, 0.85f);
|
|
}
|
|
else if (phase >= 3) {
|
|
fragColor = float4(1.0f, 0.0f, 0.5f, 0.95f);
|
|
}
|
|
}
|
|
}
|