Allow compilation of shaders using C++ for linting and IDE support. Related #127983 Pull Request: https://projects.blender.org/blender/blender/pulls/128724
20 lines
398 B
GLSL
20 lines
398 B
GLSL
/* SPDX-FileCopyrightText: 2017-2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "infos/gpu_shader_2D_diag_stripes_info.hh"
|
|
|
|
FRAGMENT_SHADER_CREATE_INFO(gpu_shader_2D_diag_stripes)
|
|
|
|
void main()
|
|
{
|
|
float phase = mod((gl_FragCoord.x + gl_FragCoord.y), float(size1 + size2));
|
|
|
|
if (phase < size1) {
|
|
fragColor = color1;
|
|
}
|
|
else {
|
|
fragColor = color2;
|
|
}
|
|
}
|