diff options
author | riperiperi <rhy3756547@hotmail.com> | 2020-04-30 02:47:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 11:47:24 +1000 |
commit | c2ac45adc5e735f752c128990e022252a6e0a426 (patch) | |
tree | e73af63d2f3be0ee0b94547c0bf70230c9af17e2 /Ryujinx.Graphics.OpenGL/Pipeline.cs | |
parent | ec620e2de0e65eac10bff64f0774abcd6857c743 (diff) |
Fix depth clamp enable bit, unit scale for polygon offset. (#1178)
Verified with deko3d and opengl driver code.
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Pipeline.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/Pipeline.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs index e313595d..604d0ba3 100644 --- a/Ryujinx.Graphics.OpenGL/Pipeline.cs +++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs @@ -549,17 +549,13 @@ namespace Ryujinx.Graphics.OpenGL return; } - GL.PolygonOffset(factor, units); + GL.PolygonOffset(factor, units / 2f); // TODO: Enable when GL_EXT_polygon_offset_clamp is supported. // GL.PolygonOffsetClamp(factor, units, clamp); } - public void SetDepthClamp(bool clampNear, bool clampFar) + public void SetDepthClamp(bool clamp) { - // TODO: Use GL_AMD_depth_clamp_separate or similar if available? - // Currently enables clamping if either is set. - bool clamp = clampNear || clampFar; - if (!clamp) { GL.Disable(EnableCap.DepthClamp); |