summaryrefslogtreecommitdiffstats
path: root/src/video_core/host_shaders
diff options
context:
space:
mode:
authorFengChen <vonchenplus@gmail.com>2023-01-12 15:42:56 +0100
committerFeng Chen <vonchenplus@gmail.com>2023-01-28 05:53:05 +0100
commit818631a412dde27dba1b34ab0858c8d1f29ea19c (patch)
tree8414eb07600d9e8b2ec8db6bda1218d453afef40 /src/video_core/host_shaders
parentMerge pull request #9677 from Morph1984/sleep-one (diff)
downloadyuzu-818631a412dde27dba1b34ab0858c8d1f29ea19c.tar
yuzu-818631a412dde27dba1b34ab0858c8d1f29ea19c.tar.gz
yuzu-818631a412dde27dba1b34ab0858c8d1f29ea19c.tar.bz2
yuzu-818631a412dde27dba1b34ab0858c8d1f29ea19c.tar.lz
yuzu-818631a412dde27dba1b34ab0858c8d1f29ea19c.tar.xz
yuzu-818631a412dde27dba1b34ab0858c8d1f29ea19c.tar.zst
yuzu-818631a412dde27dba1b34ab0858c8d1f29ea19c.zip
Diffstat (limited to 'src/video_core/host_shaders')
-rw-r--r--src/video_core/host_shaders/CMakeLists.txt2
-rw-r--r--src/video_core/host_shaders/vulkan_color_clear.frag14
-rw-r--r--src/video_core/host_shaders/vulkan_color_clear.vert10
3 files changed, 26 insertions, 0 deletions
diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt
index dad7b07d4..52cd5bb81 100644
--- a/src/video_core/host_shaders/CMakeLists.txt
+++ b/src/video_core/host_shaders/CMakeLists.txt
@@ -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
diff --git a/src/video_core/host_shaders/vulkan_color_clear.frag b/src/video_core/host_shaders/vulkan_color_clear.frag
new file mode 100644
index 000000000..617bf01e1
--- /dev/null
+++ b/src/video_core/host_shaders/vulkan_color_clear.frag
@@ -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;
+}
diff --git a/src/video_core/host_shaders/vulkan_color_clear.vert b/src/video_core/host_shaders/vulkan_color_clear.vert
new file mode 100644
index 000000000..d85883141
--- /dev/null
+++ b/src/video_core/host_shaders/vulkan_color_clear.vert
@@ -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);
+}