From 56c56aa34d40327cf045d7198fe0f40492a5dbc3 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 5 Apr 2022 18:09:06 -0300 Subject: [PATCH] Do not clamp SNorm outputs to the [0, 1] range on OpenGL (#3260) --- Ryujinx.Graphics.OpenGL/Renderer.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Ryujinx.Graphics.OpenGL/Renderer.cs b/Ryujinx.Graphics.OpenGL/Renderer.cs index a99ecfcc2..8a6b4689f 100644 --- a/Ryujinx.Graphics.OpenGL/Renderer.cs +++ b/Ryujinx.Graphics.OpenGL/Renderer.cs @@ -155,6 +155,12 @@ namespace Ryujinx.Graphics.OpenGL _pipeline.Initialize(this); _counters.Initialize(); + + // This is required to disable [0, 1] clamping for SNorm outputs on compatibility profiles. + // This call is expected to fail if we're running with a core profile, + // as this clamp target was deprecated, but that's fine as a core profile + // should already have the desired behaviour were outputs are not clamped. + GL.ClampColor(ClampColorTarget.ClampFragmentColor, ClampColorMode.False); } private void PrintGpuInformation()