Allow compilation of shaders using C++ for linting and IDE support. Related #127983 Pull Request: https://projects.blender.org/blender/blender/pulls/128724
15 lines
419 B
GLSL
15 lines
419 B
GLSL
/* SPDX-FileCopyrightText: 2018-2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "infos/gpu_shader_2D_image_desaturate_color_info.hh"
|
|
|
|
FRAGMENT_SHADER_CREATE_INFO(gpu_shader_2D_image_desaturate_color)
|
|
|
|
void main()
|
|
{
|
|
vec4 tex = texture(image, texCoord_interp);
|
|
tex.rgb = ((0.3333333 * factor) * vec3(tex.r + tex.g + tex.b)) + (tex.rgb * (1.0 - factor));
|
|
fragColor = tex * color;
|
|
}
|