Browse Source
Merge pull request #11795 from Squall-Leonhart/D32FToOther
Merge pull request #11795 from Squall-Leonhart/D32FToOther
[Vulkan]Implement missing copy formats for D32, ARGB8_SRGB and BGRA8_Unorm/SRGBpull/15/merge
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 51 additions and 1 deletions
-
1src/video_core/host_shaders/CMakeLists.txt
-
15src/video_core/host_shaders/convert_abgr8_to_d32f.frag
-
2src/video_core/host_shaders/convert_d32f_to_abgr8.frag
-
9src/video_core/renderer_vulkan/blit_image.cpp
-
4src/video_core/renderer_vulkan/blit_image.h
-
21src/video_core/renderer_vulkan/vk_texture_cache.cpp
@ -0,0 +1,15 @@ |
|||||
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project |
||||
|
// SPDX-License-Identifier: GPL-2.0-or-later |
||||
|
|
||||
|
#version 450 |
||||
|
|
||||
|
layout(binding = 0) uniform sampler2D color_texture; |
||||
|
|
||||
|
void main() { |
||||
|
ivec2 coord = ivec2(gl_FragCoord.xy); |
||||
|
vec4 color = texelFetch(color_texture, coord, 0).abgr; |
||||
|
|
||||
|
float value = color.a * (color.r + color.g + color.b) / 3.0f; |
||||
|
|
||||
|
gl_FragDepth = value; |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue