branch | v_0 |
changeset 11 | 0aeedc35ebed |
parent 4 | 9aba96f0b001 |
child 14 | ceeb36fad818 |
10:8382173bfc35 | 11:0aeedc35ebed |
---|---|
1 #version 330 core |
|
2 |
|
3 uniform sampler2D uTexture; |
|
4 in vec2 vTextureXY; |
|
5 out vec3 fColor; |
|
6 |
|
7 vec3 grayscale(vec3 original) { |
|
8 const vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); |
|
9 float luminance = dot(original, luminanceWeighting); |
|
10 return vec3(luminance); |
|
11 } |
|
12 |
|
13 void main(){ |
|
14 fColor = texture(uTexture, vTextureXY).rgb; |
|
15 // fColor = grayscale(fColor); |
|
16 // fColor *= vec3(0.8, 1., 0.2); |
|
17 } |