scripts reorganize
This commit is contained in:
1 parent
a2a056a68d
commit
0734bee219
60 files changed
+824
-5
No files matched your search
@@ -0,0 +1,18 @@
|
||||
#version 300 es
|
||||
precision mediump float;
|
||||
in vec2 v_texcoord;
|
||||
uniform sampler2D tex;
|
||||
out vec4 FragColor;
|
||||
|
||||
|
||||
// Values obtained from: http://en.wikipedia.org/wiki/Grayscale#Luma_coding_in_video_systems
|
||||
vec3 LumaFactors = vec3(0.299, 0.587, 0.114);
|
||||
|
||||
void main() {
|
||||
vec4 c = texture(tex, v_texcoord);
|
||||
|
||||
// Desaturate to luma only
|
||||
float luma = dot(vec3(c.r, c.g, c.b), LumaFactors);
|
||||
|
||||
FragColor = vec4(luma, luma, luma, c.a);
|
||||
}
|
||||