From 87abab71fff2189c549ae247eb6c281c8f618acd Mon Sep 17 00:00:00 2001
From: ameerj <52414509+ameerj@users.noreply.github.com>
Date: Sat, 23 Oct 2021 02:40:02 -0400
Subject: [PATCH] host_shaders: Misc copyright/style changes

---
 src/video_core/host_shaders/fxaa.frag             |  6 +++++-
 src/video_core/host_shaders/fxaa.vert             | 10 ++++------
 src/video_core/host_shaders/present_bicubic.frag  |  2 +-
 src/video_core/host_shaders/present_gaussian.frag |  4 ++--
 4 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/video_core/host_shaders/fxaa.frag b/src/video_core/host_shaders/fxaa.frag
index 23f910d4cb..02f4068d17 100644
--- a/src/video_core/host_shaders/fxaa.frag
+++ b/src/video_core/host_shaders/fxaa.frag
@@ -1,4 +1,8 @@
-// Adapted from
+// Copyright 2021 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+// Source code is adapted from
 // https://www.geeks3d.com/20110405/fxaa-fast-approximate-anti-aliasing-demo-glsl-opengl-test-radeon-geforce/3/
 
 #version 460
diff --git a/src/video_core/host_shaders/fxaa.vert b/src/video_core/host_shaders/fxaa.vert
index 01d5ff4dfb..ac20c04e9e 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;
diff --git a/src/video_core/host_shaders/present_bicubic.frag b/src/video_core/host_shaders/present_bicubic.frag
index f3e5410e79..902b70c2b7 100644
--- a/src/video_core/host_shaders/present_bicubic.frag
+++ b/src/video_core/host_shaders/present_bicubic.frag
@@ -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.
 
diff --git a/src/video_core/host_shaders/present_gaussian.frag b/src/video_core/host_shaders/present_gaussian.frag
index a9558548f7..72a300dac5 100644
--- a/src/video_core/host_shaders/present_gaussian.frag
+++ b/src/video_core/host_shaders/present_gaussian.frag
@@ -1,8 +1,8 @@
-// Copyright 2019 yuzu Emulator Project
+// Copyright 2021 yuzu Emulator Project
 // Licensed under GPLv2 or any later version
 // Refer to the license.txt file included.
 
-// Code obtained from this 2 sources:
+// Code adapted from the following sources:
 // - https://learnopengl.com/Advanced-Lighting/Bloom
 // - https://www.rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/