From 6405830263d36a6610fab776171a0d633a3369c7 Mon Sep 17 00:00:00 2001 From: j3oss Date: Mon, 19 Jul 2021 13:51:39 +0200 Subject: [PATCH] adjusted fxaa shader start --- assets/shaders/fxaa.frag | 7 ++++++- assets/shaders/fxaa.vert | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/assets/shaders/fxaa.frag b/assets/shaders/fxaa.frag index c81dff7..c1ee4f1 100644 --- a/assets/shaders/fxaa.frag +++ b/assets/shaders/fxaa.frag @@ -1,8 +1,13 @@ #version 450 +layout(set = 0, binding = 0) uniform sampler2D ppIN; + +layout (location = 0) in vec2 outUV; + layout(location = 0) out vec4 outColor; void main() { - //outColor = vec4(1.0); + vec3 color = texture(ppIN, outUV).rgb; + outColor = vec4(color, 1.0); } diff --git a/assets/shaders/fxaa.vert b/assets/shaders/fxaa.vert index 1e51c35..56b6b6b 100644 --- a/assets/shaders/fxaa.vert +++ b/assets/shaders/fxaa.vert @@ -4,6 +4,6 @@ layout (location = 0) out vec2 outUV; void main() { - //outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2); - //gl_Position = vec4(outUV * 2.0f - 1.0f, 0.0f, 1.0f); + outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2); + gl_Position = vec4(outUV * 2.0f - 1.0f, 0.0f, 1.0f); }