I followed the directions in the post given above, but the colors I’m getting back are wrong (eg. an all black DXT1 texture is getting (R=170,G=170,B=170,A=170) for some texels).
FTexture2DMipMap* mipMap0 = &Texture->PlatformData->Mips[0];
FByteBulkData* raw = &mipMap0->BulkData;
auto mipData = static_cast<FColor*>(raw->Lock(LOCK_READ_ONLY));
INT32 TextureWidth = mipMap0->SizeX, TextureHeight = mipMap0->SizeY;
for (int y = 0; y < TextureHeight; ++y)
{
for (int x = 0; x < TextureWidth; ++x)
{
auto str = mipData[y*TextureWidth + x].ToString();
UE_LOG(BabylonLog, Display, _T("%s"), *str);
}
}
raw->Unlock();
Wow that’s insane. My first impression of UE4 is that there’s a lot of documentation and community support, but this took me a while to find… I don’t see Texture Groups documented. I’m starting to wonder if we’re expected to look at the UE4 engine source code for some things…