double-hit-balls/assets/shaders/gui_transparent_blackandwhite.fragment
2018-07-23 01:56:46 +05:00

20 lines
360 B
Plaintext
Executable File

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);
}