Files
loop/shader/texture/grayscale.frag
T
2023-03-07 22:53:32 +00:00

13 lines
237 B
GLSL

#version 450 core
in vec2 vTexPos;
out vec4 fColor;
uniform sampler2D screenTexture;
void main()
{
fColor = texture(screenTexture, vTexPos);
float av = (fColor.r + fColor.g + fColor.b) / 3.0;
fColor = vec4(av,av,av,1.0);
}