You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Added a function to the textures to let something external use their texture mip generation to downsize a 2DImage closer to a desired target resolution. Added an utility that try to reduce the resolution of the source data of texture closer what is needed for it's rendering/in-game resolution. #preflight 64028efba726961ed9f43c7b #rnx [CL 24516727 by julien stjean in ue5-main branch]
22 lines
950 B
C++
22 lines
950 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#if WITH_EDITOR
|
|
#include "CoreTypes.h"
|
|
|
|
class UTexture;
|
|
class ITargetPlatform;
|
|
|
|
// Not tested against all the texture types and the api might change or be removed without deprecation
|
|
namespace UE::TextureUtilitiesCommon::Experimental
|
|
{
|
|
// Try to resize the texture source data so that it is not larger than one build for the specified platform (only Texture2D and TextureCube are supported at the moment)
|
|
// Note it does not trigger the post edit change after modifying the source texture
|
|
TEXTUREUTILITIESCOMMON_API bool DownsizeTextureSourceData(UTexture* Texture, int32 TargetSizeInGame, const ITargetPlatform* TargetPlatform);
|
|
|
|
//Note: This function does trigger the post edit change after modifying the source texture
|
|
TEXTUREUTILITIESCOMMON_API bool DownsizeTexureSourceDataNearRenderingSize(UTexture* Texture, const ITargetPlatform* TargetPlatform);
|
|
}
|
|
|
|
#endif // WITH_EDITOR
|