summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/OnScreenUI.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-06-23 18:08:23 +0200
committerGitHub <noreply@github.com>2023-06-23 18:08:23 +0200
commit02909bd1a560673a2d205bc95f5257436d194fad (patch)
treef7462671e50770652fae79371645027867d8d560 /Source/Core/VideoCommon/OnScreenUI.cpp
parent5bf3d55d3864274814efc883fb54e464ae406cf0 (diff)
parentdaddf4cd9cf7c45820f5cadd1539c6a6b366cfbc (diff)
Merge pull request #11850 from Filoppi/post_process_fixes
Video: implement color correction to match the Wii/GC NTSC/PAL color spaces (and gamma)
Diffstat (limited to 'Source/Core/VideoCommon/OnScreenUI.cpp')
-rw-r--r--Source/Core/VideoCommon/OnScreenUI.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/OnScreenUI.cpp b/Source/Core/VideoCommon/OnScreenUI.cpp
index d5949e356f..50e191a7ae 100644
--- a/Source/Core/VideoCommon/OnScreenUI.cpp
+++ b/Source/Core/VideoCommon/OnScreenUI.cpp
@@ -120,11 +120,15 @@ bool OnScreenUI::RecompileImGuiPipeline()
return true;
}
+ const bool linear_space_output =
+ g_presenter->GetBackbufferFormat() == AbstractTextureFormat::RGBA16F;
+
std::unique_ptr<AbstractShader> vertex_shader = g_gfx->CreateShaderFromSource(
ShaderStage::Vertex, FramebufferShaderGen::GenerateImGuiVertexShader(),
"ImGui vertex shader");
std::unique_ptr<AbstractShader> pixel_shader = g_gfx->CreateShaderFromSource(
- ShaderStage::Pixel, FramebufferShaderGen::GenerateImGuiPixelShader(), "ImGui pixel shader");
+ ShaderStage::Pixel, FramebufferShaderGen::GenerateImGuiPixelShader(linear_space_output),
+ "ImGui pixel shader");
if (!vertex_shader || !pixel_shader)
{
PanicAlertFmt("Failed to compile ImGui shaders");