blob: fa4f41b79fb5f98a6a5f766c15f9f06725f40bc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#if __VERSION__ == 120
varying vec2 texCoord_interp;
#define fragColor gl_FragColor
#else
in vec2 texCoord_interp;
out vec4 fragColor;
#define texture2D texture
#endif
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;
}
|