video_core: Implement vulkan clear specified channel
This commit is contained in:
parent
2efe42fc93
commit
818631a412
6 changed files with 152 additions and 20 deletions
|
@ -45,6 +45,8 @@ set(SHADER_FILES
|
|||
smaa_neighborhood_blending.vert
|
||||
smaa_neighborhood_blending.frag
|
||||
vulkan_blit_depth_stencil.frag
|
||||
vulkan_color_clear.frag
|
||||
vulkan_color_clear.vert
|
||||
vulkan_fidelityfx_fsr_easu_fp16.comp
|
||||
vulkan_fidelityfx_fsr_easu_fp32.comp
|
||||
vulkan_fidelityfx_fsr_rcas_fp16.comp
|
||||
|
|
14
src/video_core/host_shaders/vulkan_color_clear.frag
Normal file
14
src/video_core/host_shaders/vulkan_color_clear.frag
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#version 460 core
|
||||
|
||||
layout (push_constant) uniform PushConstants {
|
||||
vec4 clear_color;
|
||||
};
|
||||
|
||||
layout(location = 0) out vec4 color;
|
||||
|
||||
void main() {
|
||||
color = clear_color;
|
||||
}
|
10
src/video_core/host_shaders/vulkan_color_clear.vert
Normal file
10
src/video_core/host_shaders/vulkan_color_clear.vert
Normal file
|
@ -0,0 +1,10 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#version 460 core
|
||||
|
||||
void main() {
|
||||
float x = float((gl_VertexIndex & 1) << 2);
|
||||
float y = float((gl_VertexIndex & 2) << 1);
|
||||
gl_Position = vec4(x - 1.0, y - 1.0, 0.0, 1.0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue