UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TextureSourceDataUtils.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#if WITH_EDITOR
6#include "CoreTypes.h"
8
9class UTexture;
10class ITargetPlatform;
11
12// Not tested against all the texture types and the api might change or be removed without deprecation
13namespace UE::TextureUtilitiesCommon::Experimental
14{
15 // resize texture source to be <= TargetSourceSize x TargetSourceSize
16 // Halving (mip) steps are done
17 // (only Texture2D and TextureCube are supported at the moment)
18 // Note it does not trigger the post edit change after modifying the source texture
20
21 // Try to resize the texture source data to a power of two
22 // Note it does not trigger the post edit change after modifying the source texture
24
25 // Try to resize the texture source data so that it is not larger than what is built for the specified platform
26 // eg. if the output build size is 1024 but the source size is 2048, the source will be reduced to 1024
27 // Texture->LODBias is changed so that the output built size stays the same
28 // (only Texture2D and TextureCube are supported at the moment)
29 // AdditionalSourceSizeLimit can be used to apply an extra size limit on the source
30 //Note: This function DOES trigger the post edit change after modifying the source texture
32
33 // ChangeTextureSourceFormat calls Pre/Post edit change
34 // beware that changing format may change the interpretation of the SRGB bool in Texture
35 // ChangeTextureSourceFormat supports mips and blocks (udim) but not layers
37
38 // Replace TextureSource with JPEG compressed data
39 // returns true if change was made
40 // calls Pre/PostEditChange :
41 // Quality == 0 for default (85)
43}
44
45#endif // WITH_EDITOR
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ETextureSourceFormat
Definition TextureDefines.h:351
Definition Texture.h:1219