Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_image_shuffle_color_frag.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ed69184ef14508dcf2cc81a703aeb8d70ad367f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

in vec2 texCoord_interp;
out vec4 fragColor;

uniform sampler2D image;
uniform vec4 color;
uniform vec4 shuffle;

void main()
{
  vec4 sample = texture(image, texCoord_interp);
  fragColor = vec4(sample.r * shuffle.r + sample.g * shuffle.g + sample.b * shuffle.b +
                   sample.a * shuffle.a) *
              color;
}