Skip to content

Commit

Permalink
исправлена путаница с синим и красным каналами при сжатии в dds
Browse files Browse the repository at this point in the history
  • Loading branch information
abramcumner committed Feb 27, 2017
1 parent bdc786a commit 3444301
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xray/utils/xrDXT/DXT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ int DXTCompressImage (LPCSTR out_name, u8* raw_data, u32 w, u32 h, u32 pitch,
rgba_t* pixels = pImage.pixels();
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]);

in_opts.setMipmapData(pixels, w, h);
result = Compressor().process(in_opts, comp_opts, out_opts);
Expand All @@ -276,7 +276,7 @@ int DXTCompressImage (LPCSTR out_name, u8* raw_data, u32 w, u32 h, u32 pitch,
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]);
in_opts.setMipmapData(pixels, w, h);
result = Compressor().process(in_opts, comp_opts, out_opts);
}
Expand Down

0 comments on commit 3444301

Please sign in to comment.