UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TextureEncodingSettingsPrivate.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "TextureEncodingSettingsPrivate.generated.h"
7
8//
9// Encoding can either use the "Final" or "Fast" speeds, for supported encoders (e.g. Oodle)
10// Encode speed settings have no effect on encoders that don't support encode speed, currently limited to Oodle.
11//
12UCLASS(config = Engine, defaultconfig, meta = (DisplayName = "Texture Encoding"), MinimalAPI)
14{
15 //
16 // Anything added here should be added to FResolvedTextureEncodingSettings!
17 //
19
20 ENGINE_API virtual void PostInitProperties() override;
21
22 // If true, platforms that want to take a linearly encoded texture and then tile them
23 // will try to reuse the linear texture rather than encode it for every platform. This can result in
24 // massive speedups for texture building as tiling is very fast compared to encoding. So instead of:
25 //
26 // Host Platform: Linear encode
27 // Console 1: Linear encode + platform specific tile
28 // Console 2: Linear encode + platform specific tile
29 //
30 // you instead get:
31 // Host platform: Linear encode
32 // Console 1: fetch linear + platform specific tile
33 // Console 2: fetch linear + platform specific tile
34 //
35 // Note that this has no effect on cook time, only build time - once the texture is in the DDC this has no
36 // effect.
37 UPROPERTY(EditAnywhere, config, Category=EncodeSettings, meta = (ConfigRestartRequired = true))
38 uint32 bSharedLinearTextureEncoding : 1;
39
40 // If true, Final encode speed enables rate-distortion optimization on supported encoders to
41 // decrease *on disc* size of textures in compressed package files.
42 // This rate-distortion tradeoff is controlled via "Lambda". The "LossyCompressionAmount" parameter on
43 // textures is used to control it. Specific LossyCompressionAmount values correspond to
44 // to RDO lambdas of:
45 //
46 // None - Disable RDO for this texture.
47 // Lowest - 1 (Least distortion)
48 // Low - 10
49 // Medium - 20
50 // High - 30
51 // Highest - 40
52 //
53 // If set to Default, then the LossyCompressionAmount in the LODGroup for the texture is
54 // used. If that is also Default, then the RDOLambda in these settings is used.
55 //
56 // Note that any distortion introduced is on top of, and likely less than, any introduced by the format itself.
57 UPROPERTY(config, EditAnywhere, Category = EncodeSpeedSettings, meta = (ConfigRestartRequired = true))
58 uint32 bFinalUsesRDO : 1;
59
60 // Ignored if UsesRDO is false. This value is used if a given texture is using "Default" LossyCompressionAmount.
61 // Otherwise, the value of LossyCompressionAmount is translated in to a fixed lambda (see UsesRDO tooltip).
62 //
63 // Low values (1) represent highest quality (least distortion) results.
64 UPROPERTY(config, EditAnywhere, Category = EncodeSpeedSettings, meta = (DisplayName = "Final RDO Lambda", UIMin = 1, UIMax = 100, ClampMin = 1, ClampMax = 100, EditCondition = bFinalUsesRDO, ConfigRestartRequired = true))
65 int8 FinalRDOLambda;
66
67 // Specifies how much time to take trying for better encoding results.
68 UPROPERTY(config, EditAnywhere, Category = EncodeSpeedSettings, meta = (ConfigRestartRequired = true))
69 ETextureEncodeEffort FinalEffortLevel;
70
71 // Specifies how to assume textures are laid out on disc. This only applies to Oodle with RDO
72 // enabled. 256 KB is a good middle ground. Enabling this will decrease the on-disc
73 // sizes of textures for platforms with exposed texture tiling (i.e. consoles), but will slightly increase
74 // sizes of textures for platforms with opaque tiling (i.e. desktop).
75 UPROPERTY(config, EditAnywhere, Category = EncodeSpeedSettings, meta = (ConfigRestartRequired = true))
76 ETextureUniversalTiling FinalUniversalTiling;
77
78 // If true, Final encode speed enables rate-distortion optimization on supported encoders to
79 // decrease *on disc* size of textures in compressed package files.
80 // This rate-distortion tradeoff is controlled via "Lambda". The "LossyCompressionAmount" parameter on
81 // textures is used to control it. Specific LossyCompressionAmount values correspond to
82 // to RDO lambdas of:
83 //
84 // None - Disable RDO for this texture.
85 // Lowest - 1 (Least distortion)
86 // Low - 10
87 // Medium - 20
88 // High - 30
89 // Highest - 40
90 //
91 // If set to Default, then the LossyCompressionAmount in the LODGroup for the texture is
92 // used. If that is also Default, then the RDOLambda in these settings is used.
93 //
94 // Note that any distortion introduced is on top of, and likely less than, any introduced by the format itself.
95 UPROPERTY(config, EditAnywhere, Category = EncodeSpeedSettings, meta = (ConfigRestartRequired = true))
96 uint32 bFastUsesRDO : 1;
97
98 // Ignored if UsesRDO is false. This value is used if a given texture is using "Default" LossyCompressionAmount.
99 // Otherwise, the value of LossyCompressionAmount is translated in to a fixed lambda (see UsesRDO tooltip).
100 //
101 // Low values (1) represent highest quality (least distortion) results.
102 UPROPERTY(config, EditAnywhere, Category = EncodeSpeedSettings, meta = (DisplayName = "Fast RDO Lambda", UIMin = 1, UIMax = 100, ClampMin = 1, ClampMax = 100, EditCondition = bFastUsesRDO, ConfigRestartRequired = true))
103 int8 FastRDOLambda;
104
105 // Specifies how much time to take trying for better encode results.
106 UPROPERTY(config, EditAnywhere, Category = EncodeSpeedSettings, meta = (ConfigRestartRequired = true))
107 ETextureEncodeEffort FastEffortLevel;
108
109 // Specifies how to assume textures are laid out on disc. This only applies to Oodle with RDO
110 // enabled. 256 KB is a good middle ground. Enabling this will decrease the on-disc
111 // sizes of textures for platforms with exposed texture tiling (i.e. consoles), but will slightly increase
112 // sizes of textures for platforms with opaque tiling (i.e. desktop).
113 UPROPERTY(config, EditAnywhere, Category = EncodeSpeedSettings, meta = (ConfigRestartRequired = true))
114 ETextureUniversalTiling FastUniversalTiling;
115
116 // Which encode speed non interactive editor sessions will use (i.e. commandlets)
117 UPROPERTY(config, EditAnywhere, Category = EncodeSpeeds, meta = (ConfigRestartRequired = true))
118 ETextureEncodeSpeed CookUsesSpeed;
119
120 // Which encode speed everything else uses.
121 UPROPERTY(config, EditAnywhere, Category = EncodeSpeeds, meta = (ConfigRestartRequired = true))
122 ETextureEncodeSpeed EditorUsesSpeed;
123};
124
125UCLASS(config = EditorPerProjectUserSettings, defaultconfig, meta = (DisplayName = "Texture Encoding"), MinimalAPI)
127{
128 //
129 // Anything added here should be added to FResolvedTextureEncodingSettings!
130 //
132
133 ENGINE_API virtual void PostInitProperties() override;
134
135 // Local machine/project setting to force an encode speed, if desired.
136 // See the Engine "Texture Encoding" section for details.
137 UPROPERTY(config, EditAnywhere, Category = EncodeSpeeds, meta = (ConfigRestartRequired = true))
138 ETextureEncodeSpeedOverride ForceEncodeSpeed;
139};
FPlatformTypes::int8 int8
An 8-bit signed integer.
Definition Platform.h:1121
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
ETextureEncodeSpeed
Definition TextureDefines.h:287
ETextureUniversalTiling
Definition TextureEncodingSettings.h:25
ETextureEncodeEffort
Definition TextureEncodingSettings.h:15
ETextureEncodeSpeedOverride
Definition TextureEncodingSettings.h:36
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Engine.Build.cs:7
Definition DeveloperSettings.h:24
Definition TextureEncodingSettingsPrivate.h:14
Definition TextureEncodingSettingsPrivate.h:127