Implements D32_Float to A8B8G8R8_UNORM format copy
Corrects some visual issues in games such as Disney SpeedStorm
This commit is contained in:
parent
7a0da729b4
commit
9568d3bc60
5 changed files with 31 additions and 0 deletions
|
@ -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
|
||||
|
|
14
src/video_core/host_shaders/convert_d32f_to_abgr8.frag
Normal file
14
src/video_core/host_shaders/convert_d32f_to_abgr8.frag
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue