Files
LearnOpenGL/src/4.advanced_opengl/11.anti_aliasing_offscreen/11.2.aa_post.fs
2017-04-20 21:30:22 +02:00

13 lines
279 B
GLSL

#version 330 core
out vec4 FragColor;
in vec2 TexCoords;
uniform sampler2D screenTexture;
void main()
{
vec3 col = texture(screenTexture, TexCoords).rgb;
float grayscale = 0.2126 * col.r + 0.7152 * col.g + 0.0722 * col.b;
FragColor = vec4(vec3(grayscale), 1.0);
}