Skip to content

Commit

Permalink
Fix incorrect ASTC endpoint color when using LuminanceDelta mode (#4890)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdkchan committed May 11, 2023
1 parent 40d47b7 commit 0ed40c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ static Span<int> ReadIntColorValues(int number, Span<int> colorValues, ref int c
{
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);
Expand Down

0 comments on commit 0ed40c7

Please sign in to comment.