From b7613dd4b8a535d028ae180ee3a4b574abe4e3e0 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 17 Nov 2018 02:10:51 -0200 Subject: [PATCH] Enable SRGB framebuffers by default (#502) --- Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs | 2 +- Ryujinx.Graphics/NvGpuEngine3d.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs index 6f843b9c3..ef984b1ed 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs @@ -106,7 +106,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL Image.Width, Image.Height, 1); - Image.Format = GalImageFormat.RGBA8 | GalImageFormat.Unorm; + Image.Format = GalImageFormat.RGBA8 | (Image.Format & GalImageFormat.TypeMask); } (PixelInternalFormat InternalFmt, diff --git a/Ryujinx.Graphics/NvGpuEngine3d.cs b/Ryujinx.Graphics/NvGpuEngine3d.cs index 9fa428386..4a0310fb3 100644 --- a/Ryujinx.Graphics/NvGpuEngine3d.cs +++ b/Ryujinx.Graphics/NvGpuEngine3d.cs @@ -61,6 +61,8 @@ namespace Ryujinx.Graphics //FIXME: Is this correct? WriteRegister(NvGpuEngine3dReg.ColorMaskN, 0x1111); + WriteRegister(NvGpuEngine3dReg.FrameBufferSrgb, 1); + for (int Index = 0; Index < GalPipelineState.RenderTargetsCount; Index++) { WriteRegister(NvGpuEngine3dReg.IBlendNEquationRgb + Index * 8, (int)GalBlendEquation.FuncAdd);