aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-05-11 15:47:55 -0300
committerGitHub <noreply@github.com>2023-05-11 20:47:55 +0200
commit0ed40c71754e194c42a5a2758c0db1a5fc1de50b (patch)
tree4eb7ab67be88b72b5bfaee9a8261dd50e295ecc8
parent40d47b7aa235b464974480d09875eef0377bb261 (diff)
Fix incorrect ASTC endpoint color when using LuminanceDelta mode (#4890)1.1.784
-rw-r--r--src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs b/src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
index 08738583..80683d17 100644
--- a/src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
+++ b/src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
@@ -956,7 +956,7 @@ namespace Ryujinx.Graphics.Texture.Astc
{
Span<uint> val = ReadUintColorValues(2, colorValues, ref colorValuesPosition);
int l0 = (int)((val[0] >> 2) | (val[1] & 0xC0));
- int l1 = (int)Math.Max(l0 + (val[1] & 0x3F), 0xFFU);
+ int l1 = (int)Math.Min(l0 + (val[1] & 0x3F), 0xFFU);
endPoints[0] = new AstcPixel(0xFF, (short)l0, (short)l0, (short)l0);
endPoints[1] = new AstcPixel(0xFF, (short)l1, (short)l1, (short)l1);