diff --git a/Source/Engine/Graphics/Async/Tasks/GPUUploadTextureMipTask.h b/Source/Engine/Graphics/Async/Tasks/GPUUploadTextureMipTask.h index 2fa98da52..9b87fb636 100644 --- a/Source/Engine/Graphics/Async/Tasks/GPUUploadTextureMipTask.h +++ b/Source/Engine/Graphics/Async/Tasks/GPUUploadTextureMipTask.h @@ -83,12 +83,16 @@ protected: auto texture = _texture.Get(); if (texture) { - // Check if the new mips has been just uploaded if (_mipIndex == texture->HighestResidentMipIndex() - 1) { - // Mark as mip loaded + // Mark the new mip as loaded texture->SetResidentMipLevels(texture->ResidentMipLevels() + 1); } + else + { + // Mark the new mip and all lower ones as loaded (eg. when loading Model SDF texture mips at once but out of order) + texture->SetResidentMipLevels(Math::Max(texture->ResidentMipLevels(), texture->MipLevels() - _mipIndex)); + } } // Base