Tweak fullscreen texture shaders

This commit is contained in:
jgk
2021-05-01 15:03:17 +02:00
parent 7711738b3b
commit 30c09d3403
11 changed files with 89 additions and 30 deletions
+12
View File
@@ -0,0 +1,12 @@
#version 430 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);
}
+10
View File
@@ -0,0 +1,10 @@
#version 430 core
layout (location = 0) in vec2 pos;
layout (location = 1) in vec2 texPos;
out vec2 vTexPos;
void main()
{
gl_Position = vec4(pos,0,1);
vTexPos = texPos;
}