Implements D32_Float to A8B8G8R8_UNORM format copy

Corrects some visual issues in games such as Disney SpeedStorm
This commit is contained in:
Squall-Leonhart 2023-10-04 19:07:05 +11:00
parent 7a0da729b4
commit 9568d3bc60
5 changed files with 31 additions and 0 deletions

View file

@ -19,6 +19,7 @@ set(SHADER_FILES
block_linear_unswizzle_2d.comp
block_linear_unswizzle_3d.comp
convert_abgr8_to_d24s8.frag
convert_d32f_to_abgr8.frag
convert_d24s8_to_abgr8.frag
convert_depth_to_float.frag
convert_float_to_depth.frag

View file

@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#version 450
layout(binding = 0) uniform sampler2D depth_tex;
layout(location = 0) out vec4 color;
void main() {
ivec2 coord = ivec2(gl_FragCoord.xy);
float depth = textureLod(depth_tex, coord, 0).r;
color = vec4(vec3(depth), 1.0); // Convert depth to grayscale color
}