Merge pull request #891 from Azaezel/alpha401/CubeMapMangle

get probes displaying with low Texture quality
This commit is contained in:
Brian Roberts 2022-09-15 18:01:24 -05:00 committed by GitHub
commit 3a800e51cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 61 additions and 55 deletions

View file

@ -322,19 +322,8 @@ void GFXGLCubemapArray::init(GFXCubemapHandle *cubemaps, const U32 cubemapCount)
AssertFatal(cubemaps, "GFXGLCubemapArray- Got null GFXCubemapHandle!");
AssertFatal(*cubemaps, "GFXGLCubemapArray - Got empty cubemap!");
U32 downscalePower = GFXTextureManager::smTextureReductionLevel;
U32 scaledSize = cubemaps[0]->getSize();
if (downscalePower != 0)
{
// Otherwise apply the appropriate scale...
scaledSize >>= downscalePower;
}
//all cubemaps must be the same size,format and number of mipmaps. Grab the details from the first cubemap
mSize = scaledSize;
setCubeTexSize(cubemaps);
mFormat = cubemaps[0]->getFormat();
mMipMapLevels = cubemaps[0]->getMipMapLevels() - downscalePower;
mNumCubemaps = cubemapCount;
const bool isCompressed = ImageUtil::isCompressedFormat(mFormat);
@ -379,19 +368,8 @@ void GFXGLCubemapArray::init(GFXCubemapHandle *cubemaps, const U32 cubemapCount)
//Just allocate the cubemap array but we don't upload any data
void GFXGLCubemapArray::init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format)
{
U32 downscalePower = GFXTextureManager::smTextureReductionLevel;
U32 scaledSize = cubemapFaceSize;
if (downscalePower != 0)
{
// Otherwise apply the appropriate scale...
scaledSize >>= downscalePower;
}
//all cubemaps must be the same size,format and number of mipmaps. Grab the details from the first cubemap
mSize = scaledSize;
setCubeTexSize(cubemapCount);
mFormat = format;
mMipMapLevels = ImageUtil::getMaxMipCount(scaledSize, scaledSize);
mNumCubemaps = cubemapCount;
const bool isCompressed = ImageUtil::isCompressedFormat(mFormat);