From 5ad58e0605038a8acbdf6a070ca353d79e90da8d Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:37:39 -0700 Subject: [PATCH] shader: Fix shadow_texture_orthographic not being set correctly. (#6937) --- src/video_core/renderer_opengl/gl_shader_gen.cpp | 4 +--- src/video_core/renderer_vulkan/vk_shader_gen.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 180097b21..71c571d6f 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -256,9 +256,7 @@ PicaFSConfig PicaFSConfig::BuildFromRegs(const Pica::Regs& regs, bool has_blend_ state.shadow_rendering = regs.framebuffer.output_merger.fragment_operation_mode == FramebufferRegs::FragmentOperationMode::Shadow; - if (state.shadow_rendering) { - state.shadow_texture_orthographic = regs.texturing.shadow.orthographic != 0; - } + state.shadow_texture_orthographic = regs.texturing.shadow.orthographic != 0; state.use_custom_normal_map = use_normal; diff --git a/src/video_core/renderer_vulkan/vk_shader_gen.cpp b/src/video_core/renderer_vulkan/vk_shader_gen.cpp index dd6c9cbce..049366b59 100644 --- a/src/video_core/renderer_vulkan/vk_shader_gen.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_gen.cpp @@ -235,9 +235,7 @@ PicaFSConfig::PicaFSConfig(const Pica::Regs& regs, const Instance& instance) { state.shadow_rendering.Assign(regs.framebuffer.output_merger.fragment_operation_mode == FramebufferRegs::FragmentOperationMode::Shadow); - if (state.shadow_rendering) { - state.shadow_texture_orthographic.Assign(regs.texturing.shadow.orthographic != 0); - } + state.shadow_texture_orthographic.Assign(regs.texturing.shadow.orthographic != 0); } void PicaShaderConfigCommon::Init(const Pica::RasterizerRegs& rasterizer,