mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-28 16:49:43 +00:00
get probes displaying with low Texture quality
refactored detection of texture sizes for cubemaps removed the assumption that if we give U32 GFXTextureManager::getTextureDownscalePower( GFXTextureProfile *profile ) no profile, it should go right ahead and downscale anyway sniped the downscaling strings in the resulting U32 getProbeTexSize(); and void setCubeTexSize(const U32 cubemapFaceSize); until sucj time as we can properly follow up all possible combinations of shiping in one scale, and a customer choosing to use lower resolution textures as the current result is a hard shutoff entirely
This commit is contained in:
parent
1541a8cc68
commit
ad3c961579
7 changed files with 61 additions and 55 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include "gfx/gfxDevice.h"
|
||||
#include "gfx/bitmap/gBitmap.h"
|
||||
#include "gfx/gfxTextureManager.h"
|
||||
#include "gfx/bitmap/imageUtils.h"
|
||||
|
||||
|
||||
GFXCubemap::GFXCubemap()
|
||||
|
|
@ -138,3 +139,33 @@ const String GFXCubemapArray::describeSelf() const
|
|||
return String();
|
||||
}
|
||||
|
||||
|
||||
void GFXCubemapArray::setCubeTexSize(GFXCubemapHandle* cubemaps)
|
||||
{
|
||||
U32 downscalePower = 0;// 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;
|
||||
mMipMapLevels = cubemaps[0]->getMipMapLevels() - downscalePower;
|
||||
}
|
||||
|
||||
void GFXCubemapArray::setCubeTexSize(U32 cubemapFaceSize)
|
||||
{
|
||||
U32 downscalePower = 0;// GFXTextureManager::smTextureReductionLevel;
|
||||
U32 scaledSize = cubemapFaceSize;
|
||||
|
||||
if (downscalePower != 0)
|
||||
{
|
||||
scaledSize >>= downscalePower;
|
||||
}
|
||||
|
||||
mSize = scaledSize;
|
||||
mMipMapLevels = ImageUtil::getMaxMipCount(cubemapFaceSize, cubemapFaceSize) - downscalePower;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue