2023-08-24 10:54:59 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2017-2022 Blender Authors
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2017-02-16 21:49:20 -02:00
|
|
|
|
2025-09-25 10:57:02 +02:00
|
|
|
#include "infos/gpu_shader_2D_diag_stripes_infos.hh"
|
2024-11-12 18:53:34 +01:00
|
|
|
|
|
|
|
|
FRAGMENT_SHADER_CREATE_INFO(gpu_shader_2D_diag_stripes)
|
|
|
|
|
|
2017-02-16 21:49:20 -02:00
|
|
|
void main()
|
|
|
|
|
{
|
2022-12-08 21:07:28 +01:00
|
|
|
float phase = mod((gl_FragCoord.x + gl_FragCoord.y), float(size1 + size2));
|
2017-02-16 21:49:20 -02:00
|
|
|
|
|
|
|
|
if (phase < size1) {
|
|
|
|
|
fragColor = color1;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
fragColor = color2;
|
|
|
|
|
}
|
|
|
|
|
}
|