RGBA16F saving support for probes

This commit is contained in:
Tim Barnes 2018-12-05 20:01:58 +10:00
parent 10b7630312
commit 6937989d61
6 changed files with 200 additions and 56 deletions

View file

@ -379,6 +379,9 @@ void GBitmap::allocateBitmapWithMips(const U32 in_width, const U32 in_height, co
case GFXFormatR5G6B5:
case GFXFormatR5G5B5A1: mBytesPerPixel = 2;
break;
case GFXFormatR16G16B16A16F:
case GFXFormatR16G16B16A16: mBytesPerPixel = 8;
break;
default:
AssertFatal(false, "GBitmap::GBitmap: misunderstood format specifier");
break;
@ -452,6 +455,13 @@ void GBitmap::extrudeMipLevels(bool clearBorders)
bitmapExtrudeRGBA(getBits(i - 1), getWritableBits(i), getHeight(i-1), getWidth(i-1));
break;
}
case GFXFormatR16G16B16A16F:
{
for (U32 i = 1; i < mNumMipLevels; i++)
bitmapExtrudeFPRGBA(getBits(i - 1), getWritableBits(i), getHeight(i - 1), getWidth(i - 1));
break;
}
default:
break;