diff --git a/libraries/render-utils/src/TextureCache.cpp b/libraries/render-utils/src/TextureCache.cpp index f86d15079d..1a6ea97b64 100644 --- a/libraries/render-utils/src/TextureCache.cpp +++ b/libraries/render-utils/src/TextureCache.cpp @@ -325,19 +325,6 @@ void ImageReader::run() { auto ntex = dynamic_cast(&*texture); if (ntex && (ntex->getType() == CUBE_TEXTURE)) { qCDebug(renderutils) << "Cube map size:" << _url << image.width() << image.height(); - } else { - - // enforce a fixed maximum area (1024 * 2048) - const int MAXIMUM_AREA_SIZE = 2097152; - if (imageArea > MAXIMUM_AREA_SIZE) { - float scaleRatio = sqrtf((float)MAXIMUM_AREA_SIZE) / sqrtf((float)imageArea); - int resizeWidth = static_cast(std::floor(scaleRatio * static_cast(image.width()))); - int resizeHeight = static_cast(std::floor(scaleRatio * static_cast(image.height()))); - qCDebug(renderutils) << "Image greater than maximum size:" << _url << image.width() << image.height() << - " scaled to:" << resizeWidth << resizeHeight; - image = image.scaled(resizeWidth, resizeHeight, Qt::IgnoreAspectRatio); - imageArea = image.width() * image.height(); - } } int opaquePixels = 0;