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: aa3b8bd272728a3a7ace928e912bb5bf13d6e381 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

in vec2 texCoord_interp;
out vec4 fragColor;
#define texture2D texture

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

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