diff options
author | Liam <byteslice@airmail.cc> | 2024-01-22 18:40:50 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-09 15:20:53 +0100 |
commit | 962c82540c304f909957776908aabcd261f2a7ba (patch) | |
tree | 707ab34565e8309b5ede21acebf36975da7718e7 /src/video_core/host_shaders/present_gaussian.frag | |
parent | nvservices: unmap only on last container free (diff) | |
download | yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.gz yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.bz2 yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.lz yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.xz yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.zst yuzu-962c82540c304f909957776908aabcd261f2a7ba.zip |
Diffstat (limited to '')
-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; } |