double-hit-balls/assets/shaders/gui_transparent_blackandwhite.fragment

20 lines
360 B
Plaintext
Raw Permalink Normal View History

2018-07-22 20:56:46 +00:00
precision highp float;
uniform sampler2D Texture;
varying vec2 texCoord;
varying vec4 color;
void main()
{
vec4 texColor = texture2D(Texture,texCoord).rgba;
vec4 resultColor = color * texColor.rgba;
float c = (resultColor.r * 0.3 + resultColor.g * 0.59 + resultColor.b * 0.11);
gl_FragColor = vec4(c,c,c,resultColor.a);
}