Skip to content

Commit 409733a

Browse files
committed
Fix blue textures after build level from scratch.
1 parent cf1c617 commit 409733a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/xrDXT/DXT.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ int DXTCompressImage(LPCSTR out_name, u8* raw_data, u32 w, u32 h, u32 pitch, STe
260260
u8* pixel = pImagePixels;
261261
for (u32 k = 0; k < w * 2 * h; k++, pixel += 4)
262262
{
263-
pixels[k].set(pixel[2], pixel[1], pixel[0], pixel[3]);
263+
pixels[k].set(pixel[0], pixel[1], pixel[2], pixel[3]);
264264
}
265265
inOpt.setMipmapData(pixels, w, h);
266266
result = nvtt::Compressor().process(inOpt, compOpt, outOpt);
@@ -272,7 +272,7 @@ int DXTCompressImage(LPCSTR out_name, u8* raw_data, u32 w, u32 h, u32 pitch, STe
272272
rgba_t* pixels = pImage.pixels();
273273
u8* pixel = raw_data;
274274
for (u32 k = 0; k < w * h; k++, pixel += 4)
275-
pixels[k].set(pixel[2], pixel[1], pixel[0], pixel[3]);
275+
pixels[k].set(pixel[0], pixel[1], pixel[2], pixel[3]);
276276
inOpt.setMipmapData(pixels, w, h);
277277
result = nvtt::Compressor().process(inOpt, compOpt, outOpt);
278278
}

0 commit comments

Comments
 (0)