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
20 lines
421 B
GLSL
20 lines
421 B
GLSL
/* SPDX-FileCopyrightText: 2017-2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "infos/gpu_shader_2D_checker_infos.hh"
|
|
|
|
FRAGMENT_SHADER_CREATE_INFO(gpu_shader_2D_checker)
|
|
|
|
void main()
|
|
{
|
|
float2 phase = mod(gl_FragCoord.xy, (size * 2));
|
|
|
|
if ((phase.x > size && phase.y < size) || (phase.x < size && phase.y > size)) {
|
|
fragColor = color1;
|
|
}
|
|
else {
|
|
fragColor = color2;
|
|
}
|
|
}
|