This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precision mediump float; | |
varying vec2 v_texcoord; | |
uniform sampler2D tex; | |
void main() { | |
vec4 pixColor = texture2D(tex, v_texcoord); | |
// calculate the perceived brightness (https://www.101computing.net/colour-luminance-and-contrast-ratio/) | |
vec4 luminance = pixColor * vec4(0.2126, 0.7152, 0.0722, 1.0); |