diff options
| author | 2023-10-15 20:43:48 +1100 | |
|---|---|---|
| committer | 2023-10-15 20:43:48 +1100 | |
| commit | 7a986d731b55acd2249d10b2f2264c1f61b69208 (patch) | |
| tree | 31c28162c33e4ff49c9756185f43128536ee75ff /src/video_core/host_shaders | |
| parent | update shader to confirmed format copy (diff) | |
| download | yuzu-7a986d731b55acd2249d10b2f2264c1f61b69208.tar.gz yuzu-7a986d731b55acd2249d10b2f2264c1f61b69208.tar.xz yuzu-7a986d731b55acd2249d10b2f2264c1f61b69208.zip | |
Implement missing formats for Bravely Default 2
Diffstat (limited to 'src/video_core/host_shaders')
| -rw-r--r-- | src/video_core/host_shaders/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/video_core/host_shaders/convert_d32f_to_bgra8.frag | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt index 8bb429578..cf20f39f0 100644 --- a/src/video_core/host_shaders/CMakeLists.txt +++ b/src/video_core/host_shaders/CMakeLists.txt | |||
| @@ -20,6 +20,7 @@ set(SHADER_FILES | |||
| 20 | block_linear_unswizzle_3d.comp | 20 | block_linear_unswizzle_3d.comp |
| 21 | convert_abgr8_to_d24s8.frag | 21 | convert_abgr8_to_d24s8.frag |
| 22 | convert_d32f_to_abgr8.frag | 22 | convert_d32f_to_abgr8.frag |
| 23 | convert_d32f_to_bgra8.frag | ||
| 23 | convert_d24s8_to_abgr8.frag | 24 | convert_d24s8_to_abgr8.frag |
| 24 | convert_depth_to_float.frag | 25 | convert_depth_to_float.frag |
| 25 | convert_float_to_depth.frag | 26 | convert_float_to_depth.frag |
diff --git a/src/video_core/host_shaders/convert_d32f_to_bgra8.frag b/src/video_core/host_shaders/convert_d32f_to_bgra8.frag new file mode 100644 index 000000000..c0d8ff36b --- /dev/null +++ b/src/video_core/host_shaders/convert_d32f_to_bgra8.frag | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #version 450 | ||
| 5 | |||
| 6 | layout(binding = 0) uniform sampler2D depth_tex; | ||
| 7 | |||
| 8 | layout(location = 0) out vec4 color; | ||
| 9 | |||
| 10 | void main() { | ||
| 11 | ivec2 coord = ivec2(gl_FragCoord.xy); | ||
| 12 | float depth = textureLod(depth_tex, coord, 0).r; | ||
| 13 | color = vec4(depth, depth, depth, 1.0); | ||
| 14 | color = color.bgra; // Swap color channels for BGRA format | ||
| 15 | } \ No newline at end of file | ||