Files
test/source/blender/gpu/shaders/gpu_shader_image_desaturate_frag.glsl
Clément Foucault 091004f1b8 GPU: GLSL compilation as C++ for gpu static shaders
Allow compilation of shaders using C++ for linting and
IDE support.

Related #127983

Pull Request: https://projects.blender.org/blender/blender/pulls/128724
2024-11-12 18:53:34 +01:00

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;
}