From 6f342ec8b6b7c3c6a3b0eb69c059932c08e551b6 Mon Sep 17 00:00:00 2001 From: lizzie Date: Thu, 12 Mar 2026 03:13:18 +0000 Subject: [PATCH] STUPID SHADER --- src/video_core/host_shaders/y8v8u8_n420.comp | 55 -------------------- 1 file changed, 55 deletions(-) delete mode 100644 src/video_core/host_shaders/y8v8u8_n420.comp diff --git a/src/video_core/host_shaders/y8v8u8_n420.comp b/src/video_core/host_shaders/y8v8u8_n420.comp deleted file mode 100644 index 956af7f525..0000000000 --- a/src/video_core/host_shaders/y8v8u8_n420.comp +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#version 450 - -#ifdef VULKAN -#define BEGIN_PUSH_CONSTANTS layout(push_constant) uniform PushConstants { -#define END_PUSH_CONSTANTS }; -#define UNIFORM(n) -#define BINDING_INPUT_BUFFER 0 -#define BINDING_OUTPUT_IMAGE 1 -#else // ^^^ Vulkan ^^^ // vvv OpenGL vvv -#define BEGIN_PUSH_CONSTANTS -#define END_PUSH_CONSTANTS -#define UNIFORM(n) layout(location = n) uniform -#define BINDING_INPUT_BUFFER 0 -#define BINDING_OUTPUT_IMAGE 0 -#endif - -BEGIN_PUSH_CONSTANTS -UNIFORM(1) uint in_luma_stride; -UNIFORM(2) uint in_chroma_stride; -UNIFORM(3) uint out_luma_stride; -UNIFORM(4) uint out_chroma_stride; -UNIFORM(5) uint is_planar; -UNIFORM(6) uint planar_alpha; -END_PUSH_CONSTANTS - -// R = Luma, G = chroma V, B = chroma U -layout(binding = 0) uniform sampler2D yuv_buffer_lm; -layout(binding = 0) uniform sampler2D yuv_buffer_cv; -layout(binding = 0) uniform sampler2D yuv_buffer_cu; -layout(location = 0) out vec4 output_color; - -ivec2 IndexTexelCoord(ivec2 scale, uint i) { - return ivec2(i % scale.x, i / scale.x); -} -void main() { - ivec2 texel_scale = textureSize(yuv_buffer, 0).xy; - ivec2 texel_pos = ivec2(gl_FragCoord.xy * vec2(texel_scale)); - uint src_luma = uint(texel_pos.y) * in_luma_stride; - uint src_chroma = (uint(texel_pos.y) / 2) * in_chroma_stride; - uint dst = uint(texel_pos.y) * out_luma_stride; - uint yuv_r = uint(texelFetch(yuv_buffer, IndexTexelCoord(src_luma + x), 0).r * 255.f); - uint yuv_g; - uint yuv_b; - if (is_planar) { - yuv_g = uint(texelFetch(yuv_buffer, IndexTexelCoord(src_chroma + x / 2), 0).r * 255.f) << 2; - yuv_b = uint(texelFetch(yuv_buffer, IndexTexelCoord(src_chroma + x / 2), 0).r * 255.f) << 2; - } else { - yuv_g = uint(texelFetch(yuv_buffer, IndexTexelCoord(src_chroma + (x & ~1) + 0), 0).r * 255.f) << 2; - yuv_b = uint(texelFetch(yuv_buffer, IndexTexelCoord(src_chroma + (x & ~1) + 1), 0).r * 255.f) << 2; - } - output_color = vec4(uvec4(yuv_r, yuv_g, yuv_b, planar_alpha)) / 255.f; -}