Explorar o código

Do not clamp SNorm outputs to the [0, 1] range on OpenGL (#3260)

gdkchan %!s(int64=4) %!d(string=hai) anos
pai
achega
56c56aa34d
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      Ryujinx.Graphics.OpenGL/Renderer.cs

+ 6 - 0
Ryujinx.Graphics.OpenGL/Renderer.cs

@@ -155,6 +155,12 @@ namespace Ryujinx.Graphics.OpenGL
 
 
             _pipeline.Initialize(this);
             _pipeline.Initialize(this);
             _counters.Initialize();
             _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()
         private void PrintGpuInformation()