diff options
| author | 2021-10-23 02:40:02 -0400 | |
|---|---|---|
| committer | 2021-11-16 22:11:33 +0100 | |
| commit | 87abab71fff2189c549ae247eb6c281c8f618acd (patch) | |
| tree | 9002e2014e964ecd4e36a15bb256476fee3aa0a2 /src | |
| parent | configure_graphics.ui: Cleanup scaling options and fix duplicate name warning (diff) | |
| download | yuzu-87abab71fff2189c549ae247eb6c281c8f618acd.tar.gz yuzu-87abab71fff2189c549ae247eb6c281c8f618acd.tar.xz yuzu-87abab71fff2189c549ae247eb6c281c8f618acd.zip | |
host_shaders: Misc copyright/style changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/host_shaders/fxaa.frag | 6 | ||||
| -rw-r--r-- | src/video_core/host_shaders/fxaa.vert | 10 | ||||
| -rw-r--r-- | src/video_core/host_shaders/present_bicubic.frag | 2 | ||||
| -rw-r--r-- | 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 23f910d4c..02f4068d1 100644 --- a/src/video_core/host_shaders/fxaa.frag +++ b/src/video_core/host_shaders/fxaa.frag | |||
| @@ -1,4 +1,8 @@ | |||
| 1 | // Adapted from | 1 | // Copyright 2021 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | // Source code is adapted from | ||
| 2 | // https://www.geeks3d.com/20110405/fxaa-fast-approximate-anti-aliasing-demo-glsl-opengl-test-radeon-geforce/3/ | 6 | // https://www.geeks3d.com/20110405/fxaa-fast-approximate-anti-aliasing-demo-glsl-opengl-test-radeon-geforce/3/ |
| 3 | 7 | ||
| 4 | #version 460 | 8 | #version 460 |
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 @@ | |||
| 1 | // Copyright 2019 yuzu Emulator Project | 1 | // Copyright 2021 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| @@ -16,10 +16,12 @@ layout (location = 0) out vec4 posPos; | |||
| 16 | #ifdef VULKAN | 16 | #ifdef VULKAN |
| 17 | 17 | ||
| 18 | #define BINDING_COLOR_TEXTURE 0 | 18 | #define BINDING_COLOR_TEXTURE 0 |
| 19 | #define VERTEX_ID gl_VertexIndex | ||
| 19 | 20 | ||
| 20 | #else // ^^^ Vulkan ^^^ // vvv OpenGL vvv | 21 | #else // ^^^ Vulkan ^^^ // vvv OpenGL vvv |
| 21 | 22 | ||
| 22 | #define BINDING_COLOR_TEXTURE 0 | 23 | #define BINDING_COLOR_TEXTURE 0 |
| 24 | #define VERTEX_ID gl_VertexID | ||
| 23 | 25 | ||
| 24 | #endif | 26 | #endif |
| 25 | 27 | ||
| @@ -28,11 +30,7 @@ layout (binding = BINDING_COLOR_TEXTURE) uniform sampler2D input_texture; | |||
| 28 | const float FXAA_SUBPIX_SHIFT = 0; | 30 | const float FXAA_SUBPIX_SHIFT = 0; |
| 29 | 31 | ||
| 30 | void main() { | 32 | void main() { |
| 31 | #ifdef VULKAN | 33 | vec2 vertex = vertices[VERTEX_ID]; |
| 32 | vec2 vertex = vertices[gl_VertexIndex]; | ||
| 33 | #else | ||
| 34 | vec2 vertex = vertices[gl_VertexID]; | ||
| 35 | #endif | ||
| 36 | gl_Position = vec4(vertex, 0.0, 1.0); | 34 | gl_Position = vec4(vertex, 0.0, 1.0); |
| 37 | vec2 vert_tex_coord = (vertex + 1.0) / 2.0; | 35 | vec2 vert_tex_coord = (vertex + 1.0) / 2.0; |
| 38 | posPos.xy = vert_tex_coord; | 36 | 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 f3e5410e7..902b70c2b 100644 --- a/src/video_core/host_shaders/present_bicubic.frag +++ b/src/video_core/host_shaders/present_bicubic.frag | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2019 yuzu Emulator Project | 1 | // Copyright 2021 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/video_core/host_shaders/present_gaussian.frag b/src/video_core/host_shaders/present_gaussian.frag index a9558548f..72a300dac 100644 --- a/src/video_core/host_shaders/present_gaussian.frag +++ b/src/video_core/host_shaders/present_gaussian.frag | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | // Copyright 2019 yuzu Emulator Project | 1 | // Copyright 2021 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | // Code obtained from this 2 sources: | 5 | // Code adapted from the following sources: |
| 6 | // - https://learnopengl.com/Advanced-Lighting/Bloom | 6 | // - https://learnopengl.com/Advanced-Lighting/Bloom |
| 7 | // - https://www.rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/ | 7 | // - https://www.rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/ |
| 8 | 8 | ||