diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2024-02-12 03:58:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-12 03:58:28 +0100 |
commit | 2ff45cd0da941dce2564f5c18c580d0283da27bf (patch) | |
tree | 81fea8c23f9afa39c167288e03ff57eb25413ee4 /src/video_core/host_shaders/present_gaussian.frag | |
parent | Merge pull request #12991 from german77/news2 (diff) | |
parent | am: use applet program loading for tested versions (diff) | |
download | yuzu-2ff45cd0da941dce2564f5c18c580d0283da27bf.tar yuzu-2ff45cd0da941dce2564f5c18c580d0283da27bf.tar.gz yuzu-2ff45cd0da941dce2564f5c18c580d0283da27bf.tar.bz2 yuzu-2ff45cd0da941dce2564f5c18c580d0283da27bf.tar.lz yuzu-2ff45cd0da941dce2564f5c18c580d0283da27bf.tar.xz yuzu-2ff45cd0da941dce2564f5c18c580d0283da27bf.tar.zst yuzu-2ff45cd0da941dce2564f5c18c580d0283da27bf.zip |
Diffstat (limited to 'src/video_core/host_shaders/present_gaussian.frag')
-rw-r--r-- | src/video_core/host_shaders/present_gaussian.frag | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/host_shaders/present_gaussian.frag b/src/video_core/host_shaders/present_gaussian.frag index ad9bb76a4..78edeb9b4 100644 --- a/src/video_core/host_shaders/present_gaussian.frag +++ b/src/video_core/host_shaders/present_gaussian.frag @@ -46,14 +46,14 @@ vec4 blurDiagonal(sampler2D textureSampler, vec2 coord, vec2 norm) { } void main() { - vec3 base = texture(color_texture, vec2(frag_tex_coord)).rgb * weight[0]; + vec4 base = texture(color_texture, vec2(frag_tex_coord)) * weight[0]; vec2 tex_offset = 1.0f / textureSize(color_texture, 0); // TODO(Blinkhawk): This code can be optimized through shader group instructions. - vec3 horizontal = blurHorizontal(color_texture, frag_tex_coord, tex_offset).rgb; - vec3 vertical = blurVertical(color_texture, frag_tex_coord, tex_offset).rgb; - vec3 diagonalA = blurDiagonal(color_texture, frag_tex_coord, tex_offset).rgb; - vec3 diagonalB = blurDiagonal(color_texture, frag_tex_coord, tex_offset * vec2(1.0, -1.0)).rgb; - vec3 combination = mix(mix(horizontal, vertical, 0.5f), mix(diagonalA, diagonalB, 0.5f), 0.5f); - color = vec4(combination + base, 1.0f); + vec4 horizontal = blurHorizontal(color_texture, frag_tex_coord, tex_offset); + vec4 vertical = blurVertical(color_texture, frag_tex_coord, tex_offset); + vec4 diagonalA = blurDiagonal(color_texture, frag_tex_coord, tex_offset); + vec4 diagonalB = blurDiagonal(color_texture, frag_tex_coord, tex_offset * vec2(1.0, -1.0)); + vec4 combination = mix(mix(horizontal, vertical, 0.5f), mix(diagonalA, diagonalB, 0.5f), 0.5f); + color = combination + base; } |