Skip to content

Commit

Permalink
Fix blue textures after build level from scratch.
Browse files Browse the repository at this point in the history
  • Loading branch information
intorr committed Jan 24, 2018
1 parent cf1c617 commit 409733a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/xrDXT/DXT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ int DXTCompressImage(LPCSTR out_name, u8* raw_data, u32 w, u32 h, u32 pitch, STe
u8* pixel = pImagePixels;
for (u32 k = 0; k < w * 2 * h; k++, pixel += 4)
{
pixels[k].set(pixel[2], pixel[1], pixel[0], pixel[3]);
pixels[k].set(pixel[0], pixel[1], pixel[2], pixel[3]);
}
inOpt.setMipmapData(pixels, w, h);
result = nvtt::Compressor().process(inOpt, compOpt, outOpt);
Expand All @@ -272,7 +272,7 @@ int DXTCompressImage(LPCSTR out_name, u8* raw_data, u32 w, u32 h, u32 pitch, STe
rgba_t* pixels = pImage.pixels();
u8* pixel = raw_data;
for (u32 k = 0; k < w * h; k++, pixel += 4)
pixels[k].set(pixel[2], pixel[1], pixel[0], pixel[3]);
pixels[k].set(pixel[0], pixel[1], pixel[2], pixel[3]);
inOpt.setMipmapData(pixels, w, h);
result = nvtt::Compressor().process(inOpt, compOpt, outOpt);
}
Expand Down

0 comments on commit 409733a

Please sign in to comment.