diff options
author | Liam <byteslice@airmail.cc> | 2022-12-08 22:52:29 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-12-08 23:17:45 +0100 |
commit | 5b837157bde2115cf4781c5353f598eb6f0f7109 (patch) | |
tree | e69496d0ae0191642de95cd2c27585276cc3669e /src/video_core/host_shaders/smaa_neighborhood_blending.frag | |
parent | Merge pull request #9401 from vonchenplus/draw_manager (diff) | |
download | yuzu-5b837157bde2115cf4781c5353f598eb6f0f7109.tar yuzu-5b837157bde2115cf4781c5353f598eb6f0f7109.tar.gz yuzu-5b837157bde2115cf4781c5353f598eb6f0f7109.tar.bz2 yuzu-5b837157bde2115cf4781c5353f598eb6f0f7109.tar.lz yuzu-5b837157bde2115cf4781c5353f598eb6f0f7109.tar.xz yuzu-5b837157bde2115cf4781c5353f598eb6f0f7109.tar.zst yuzu-5b837157bde2115cf4781c5353f598eb6f0f7109.zip |
Diffstat (limited to 'src/video_core/host_shaders/smaa_neighborhood_blending.frag')
-rw-r--r-- | src/video_core/host_shaders/smaa_neighborhood_blending.frag | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/video_core/host_shaders/smaa_neighborhood_blending.frag b/src/video_core/host_shaders/smaa_neighborhood_blending.frag new file mode 100644 index 000000000..e3de6e249 --- /dev/null +++ b/src/video_core/host_shaders/smaa_neighborhood_blending.frag @@ -0,0 +1,31 @@ +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#version 460 + +#extension GL_GOOGLE_include_directive : enable + +layout (binding = 0) uniform sampler2D input_tex; +layout (binding = 1) uniform sampler2D blend_tex; + +layout (location = 0) in vec2 tex_coord; +layout (location = 1) in vec4 offset; + +layout (location = 0) out vec4 frag_color; + +vec4 metrics = vec4(1.0 / textureSize(input_tex, 0), textureSize(input_tex, 0)); +#define SMAA_RT_METRICS metrics +#define SMAA_GLSL_4 +#define SMAA_PRESET_ULTRA +#define SMAA_INCLUDE_VS 0 +#define SMAA_INCLUDE_PS 1 + +#include "opengl_smaa.glsl" + +void main() { + frag_color = SMAANeighborhoodBlendingPS(tex_coord, + offset, + input_tex, + blend_tex + ); +} |