diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-07-05 19:58:36 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-05 19:58:36 -0300 |
commit | b46b63e06a36845175f68331edb5ddeeb34de27b (patch) | |
tree | 1ca8adf9541d1f68e420feb853a612413d690725 /Ryujinx.Graphics.OpenGL/Pipeline.cs | |
parent | 594246ea4727c9377b1c916934d9b257a1b5d0d0 (diff) |
Add support for alpha to coverage dithering (#3069)1.1.164
* Add support for alpha to coverage dithering
* Shader cache version bump
* Fix wrong alpha register
* Ensure support buffer is cleared
* New shader specialization based approach
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Pipeline.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/Pipeline.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs index 62d4dee9..fde86424 100644 --- a/Ryujinx.Graphics.OpenGL/Pipeline.cs +++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs @@ -918,6 +918,34 @@ namespace Ryujinx.Graphics.OpenGL } } + public void SetMultisampleState(MultisampleDescriptor multisample) + { + if (multisample.AlphaToCoverageEnable) + { + GL.Enable(EnableCap.SampleAlphaToCoverage); + + if (multisample.AlphaToOneEnable) + { + GL.Enable(EnableCap.SampleAlphaToOne); + } + else + { + GL.Disable(EnableCap.SampleAlphaToOne); + } + + if (HwCapabilities.SupportsAlphaToCoverageDitherControl) + { + GL.NV.AlphaToCoverageDitherControl(multisample.AlphaToCoverageDitherEnable + ? NvAlphaToCoverageDitherControl.AlphaToCoverageDitherEnableNv + : NvAlphaToCoverageDitherControl.AlphaToCoverageDitherDisableNv); + } + } + else + { + GL.Disable(EnableCap.SampleAlphaToCoverage); + } + } + public void SetLineParameters(float width, bool smooth) { if (smooth) |