Skip to content

Commit a268028

Browse files
authored
Merge pull request #115 from wolfcomp/patch-1
Correct color from conversion
2 parents 2afed74 + 9dc705d commit a268028

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Lumina/Data/Parsing/Tex/Buffers/BlockCompressionTextureBuffer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ protected override void ConvertToB8G8R8A8( byte[] buffer, int destOffset, int so
7272
for( var j = 0; j < rgbaData.Length; j++ )
7373
{
7474
var color = rgbaData[j];
75-
buffer[destOffset + ( i * width * height * 4 ) + ( j * 4 ) + 0] = color.r;
75+
buffer[destOffset + ( i * width * height * 4 ) + ( j * 4 ) + 0] = color.b;
7676
buffer[destOffset + ( i * width * height * 4 ) + ( j * 4 ) + 1] = color.g;
77-
buffer[destOffset + ( i * width * height * 4 ) + ( j * 4 ) + 2] = color.b;
77+
buffer[destOffset + ( i * width * height * 4 ) + ( j * 4 ) + 2] = color.r;
7878
buffer[destOffset + ( i * width * height * 4 ) + ( j * 4 ) + 3] = color.a;
7979
}
8080
}
@@ -89,4 +89,4 @@ private int CalculateNumBytesPerPlane( int w, int h ) =>
8989
Math.Max( 1, ( ( h + 3 ) / 4 ) ) *
9090
( _version == 1 ? 8 : 16 );
9191
}
92-
}
92+
}

0 commit comments

Comments
 (0)