mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
13 lines
279 B
GLSL
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);
|
|
} |