summaryrefslogtreecommitdiffstats
path: root/src/video_core/host_shaders/fxaa.vert
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-10-23 08:40:02 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:33 +0100
commit87abab71fff2189c549ae247eb6c281c8f618acd (patch)
tree9002e2014e964ecd4e36a15bb256476fee3aa0a2 /src/video_core/host_shaders/fxaa.vert
parentconfigure_graphics.ui: Cleanup scaling options and fix duplicate name warning (diff)
downloadyuzu-87abab71fff2189c549ae247eb6c281c8f618acd.tar
yuzu-87abab71fff2189c549ae247eb6c281c8f618acd.tar.gz
yuzu-87abab71fff2189c549ae247eb6c281c8f618acd.tar.bz2
yuzu-87abab71fff2189c549ae247eb6c281c8f618acd.tar.lz
yuzu-87abab71fff2189c549ae247eb6c281c8f618acd.tar.xz
yuzu-87abab71fff2189c549ae247eb6c281c8f618acd.tar.zst
yuzu-87abab71fff2189c549ae247eb6c281c8f618acd.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/host_shaders/fxaa.vert10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/video_core/host_shaders/fxaa.vert b/src/video_core/host_shaders/fxaa.vert
index 01d5ff4df..ac20c04e9 100644
--- a/src/video_core/host_shaders/fxaa.vert
+++ b/src/video_core/host_shaders/fxaa.vert
@@ -1,4 +1,4 @@
-// Copyright 2019 yuzu Emulator Project
+// Copyright 2021 yuzu Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
@@ -16,10 +16,12 @@ layout (location = 0) out vec4 posPos;
#ifdef VULKAN
#define BINDING_COLOR_TEXTURE 0
+#define VERTEX_ID gl_VertexIndex
#else // ^^^ Vulkan ^^^ // vvv OpenGL vvv
#define BINDING_COLOR_TEXTURE 0
+#define VERTEX_ID gl_VertexID
#endif
@@ -28,11 +30,7 @@ layout (binding = BINDING_COLOR_TEXTURE) uniform sampler2D input_texture;
const float FXAA_SUBPIX_SHIFT = 0;
void main() {
-#ifdef VULKAN
- vec2 vertex = vertices[gl_VertexIndex];
-#else
- vec2 vertex = vertices[gl_VertexID];
-#endif
+ vec2 vertex = vertices[VERTEX_ID];
gl_Position = vec4(vertex, 0.0, 1.0);
vec2 vert_tex_coord = (vertex + 1.0) / 2.0;
posPos.xy = vert_tex_coord;