host_shaders: Misc copyright/style changes

This commit is contained in:
ameerj 2021-10-23 02:40:02 -04:00 committed by Fernando Sahmkow
parent 864f2e0b81
commit 87abab71ff
4 changed files with 12 additions and 10 deletions

View File

@ -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/ // https://www.geeks3d.com/20110405/fxaa-fast-approximate-anti-aliasing-demo-glsl-opengl-test-radeon-geforce/3/
#version 460 #version 460

View File

@ -1,4 +1,4 @@
// Copyright 2019 yuzu Emulator Project // Copyright 2021 yuzu Emulator Project
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
@ -16,10 +16,12 @@ layout (location = 0) out vec4 posPos;
#ifdef VULKAN #ifdef VULKAN
#define BINDING_COLOR_TEXTURE 0 #define BINDING_COLOR_TEXTURE 0
#define VERTEX_ID gl_VertexIndex
#else // ^^^ Vulkan ^^^ // vvv OpenGL vvv #else // ^^^ Vulkan ^^^ // vvv OpenGL vvv
#define BINDING_COLOR_TEXTURE 0 #define BINDING_COLOR_TEXTURE 0
#define VERTEX_ID gl_VertexID
#endif #endif
@ -28,11 +30,7 @@ layout (binding = BINDING_COLOR_TEXTURE) uniform sampler2D input_texture;
const float FXAA_SUBPIX_SHIFT = 0; const float FXAA_SUBPIX_SHIFT = 0;
void main() { void main() {
#ifdef VULKAN vec2 vertex = vertices[VERTEX_ID];
vec2 vertex = vertices[gl_VertexIndex];
#else
vec2 vertex = vertices[gl_VertexID];
#endif
gl_Position = vec4(vertex, 0.0, 1.0); gl_Position = vec4(vertex, 0.0, 1.0);
vec2 vert_tex_coord = (vertex + 1.0) / 2.0; vec2 vert_tex_coord = (vertex + 1.0) / 2.0;
posPos.xy = vert_tex_coord; posPos.xy = vert_tex_coord;

View File

@ -1,4 +1,4 @@
// Copyright 2019 yuzu Emulator Project // Copyright 2021 yuzu Emulator Project
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.

View File

@ -1,8 +1,8 @@
// Copyright 2019 yuzu Emulator Project // Copyright 2021 yuzu Emulator Project
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // 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://learnopengl.com/Advanced-Lighting/Bloom
// - https://www.rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/ // - https://www.rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/