mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 20:35:35 +00:00
RGBA16F saving support for probes
This commit is contained in:
parent
10b7630312
commit
6937989d61
6 changed files with 200 additions and 56 deletions
|
|
@ -52,6 +52,7 @@ namespace CubemapSaver
|
|||
GFXFormat targetFmt = pCubemap->getFormat();
|
||||
//setup render targets
|
||||
GFXTexHandle pTextures[CubeFaces];
|
||||
|
||||
for (U32 face = 0; face < CubeFaces; face++)
|
||||
{
|
||||
pTextures[face].set(faceSize, faceSize, targetFmt,
|
||||
|
|
@ -75,9 +76,6 @@ namespace CubemapSaver
|
|||
Con::errorf("CubemapSaver: cubemap number %u failed to copy", i);
|
||||
error = true;
|
||||
}
|
||||
//gen mip maps if there are none
|
||||
if(!hasMips)
|
||||
pBitmaps[i]->extrudeMipLevels();
|
||||
}
|
||||
|
||||
if (!error)
|
||||
|
|
@ -85,8 +83,8 @@ namespace CubemapSaver
|
|||
DDSFile *pDds = DDSFile::createDDSCubemapFileFromGBitmaps(pBitmaps);
|
||||
if (pDds)
|
||||
{
|
||||
// non compressed format needs swizzling
|
||||
if (!compressedFormat)
|
||||
// compressed and floating point don't need swizzling
|
||||
if (!compressedFormat && targetFmt != GFXFormatR16G16B16A16F)
|
||||
ImageUtil::swizzleDDS(pDds, Swizzles::bgra);
|
||||
|
||||
if(compressedFormat)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue