bSharedLinearTextureEncoding
bSharedLinearTextureEncoding
#Overview
name: bSharedLinearTextureEncoding
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 7
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bSharedLinearTextureEncoding is to control the use of shared linear texture encoding in Unreal Engine’s texture processing pipeline. This setting is primarily related to the texture encoding and rendering systems.
Based on the provided callsites, this variable is used in the following Unreal Engine subsystems and modules:
- UnrealEd module (DerivedDataCacheCommandlet)
- Engine module (TextureDerivedData and TextureEncodingSettings)
The value of this variable is set in the UTextureEncodingProjectSettings class, which is a subclass of UDeveloperSettings. It can be configured through project settings or overridden via command-line arguments.
This variable interacts with other texture encoding settings, such as bFinalUsesRDO, bFastUsesRDO, FinalRDOLambda, and FastRDOLambda. It is part of a larger set of texture encoding configuration options.
Developers should be aware of the following when using this variable:
- Enabling shared linear texture encoding can affect texture processing and storage.
- It can be overridden via command-line arguments, which may impact build processes.
- Changes to this setting may require a project restart to take effect.
Best practices when using this variable include:
- Consider the impact on texture quality and performance when enabling or disabling this feature.
- Ensure consistency across the project by setting it at the project level rather than overriding it frequently.
- Be aware of how this setting interacts with other texture encoding options and adjust them accordingly.
- Document any changes to this setting and communicate them to the development team to ensure everyone is aware of the current configuration.
#Setting Variables
#References In INI files
Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:274, section: [/Script/Engine.TextureEncodingProjectSettings]
- INI Section:
/Script/Engine.TextureEncodingProjectSettings
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/DerivedDataCacheCommandlet.cpp:478
Scope (from outer to inner):
file
function int32 UDerivedDataCacheCommandlet::Main
Source code excerpt:
bool bDoSubset = SubsetMod > 0 && SubsetTarget < SubsetMod;
if (FResolvedTextureEncodingSettings::Get().Project.bSharedLinearTextureEncoding)
{
bSharedLinearTextureEncodingEnabled = true;
}
double FindProcessedPackagesTime = 0.0;
double GCTime = 0.0;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureDerivedData.cpp:700
Scope (from outer to inner):
file
function static void FinalizeBuildSettingsForLayer
Source code excerpt:
{
if (FResolvedTextureEncodingSettings::Get().Project.bSharedLinearTextureEncoding)
{
//
// We want to separate out textures involved in shared linear encoding in order to facilitate
// fixing bugs without invalidating the world (even though we expect the exact same data to
// get generated). However, virtual textures never tile, and so are exempt from this separation.
//
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureEncodingSettings.cpp:11
Scope (from outer to inner):
file
function UTextureEncodingProjectSettings::UTextureEncodingProjectSettings
Source code excerpt:
UTextureEncodingProjectSettings::UTextureEncodingProjectSettings(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer),
bSharedLinearTextureEncoding(false),
bFinalUsesRDO(false),
FinalRDOLambda(30), /* OodleTex_RDOLagrangeLambda_Default */
FinalEffortLevel(ETextureEncodeEffort::Normal),
FinalUniversalTiling(ETextureUniversalTiling::Disabled),
bFastUsesRDO(false),
FastRDOLambda(30), /* OodleTex_RDOLagrangeLambda_Default */
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureEncodingSettings.cpp:67
Scope (from outer to inner):
file
function static void ConstructResolvedSettings
Source code excerpt:
OutResolvedSettings->User.ForceEncodeSpeed = UserSettings->ForceEncodeSpeed;
OutResolvedSettings->Project.bSharedLinearTextureEncoding = ProjectSettings->bSharedLinearTextureEncoding;
{
bool CmdLineSLE;
if (FParse::Bool(FCommandLine::Get(), TEXT("-ForceSharedLinearTextureEncoding="), CmdLineSLE))
{
OutResolvedSettings->Project.bSharedLinearTextureEncoding = CmdLineSLE;
UE_LOG(LogTextureEncodingSettings, Display, TEXT("Shared linear texture encoding forced to %s via command line."), *LexToString(CmdLineSLE));
}
}
OutResolvedSettings->Project.bFinalUsesRDO = ProjectSettings->bFinalUsesRDO;
OutResolvedSettings->Project.bFastUsesRDO = ProjectSettings->bFastUsesRDO;
OutResolvedSettings->Project.FinalRDOLambda = ProjectSettings->FinalRDOLambda;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureEncodingSettings.cpp:172
Scope (from outer to inner):
file
function static void ConstructResolvedSettings
Source code excerpt:
}
UE_LOG(LogTextureEncodingSettings, Display, TEXT("Shared linear texture encoding: %s"), OutResolvedSettings->Project.bSharedLinearTextureEncoding ? TEXT("Enabled") : TEXT("Disabled"));
}
static void TryToResolveSettings(ReadyMask InReadyMask, UDeveloperSettings* InSettings, FResolvedTextureEncodingSettings** OutResolvedSettings)
{
static FResolvedTextureEncodingSettings ResolvedSettings;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureEncodingSettingsPrivate.h:35
Scope (from outer to inner):
file
class class UTextureEncodingProjectSettings : public UDeveloperSettings
Source code excerpt:
// effect.
UPROPERTY(EditAnywhere, config, Category=EncodeSettings, meta = (ConfigRestartRequired = true))
uint32 bSharedLinearTextureEncoding : 1;
// If true, Final encode speed enables rate-distortion optimization on supported encoders to
// decrease *on disc* size of textures in compressed package files.
// This rate-distortion tradeoff is controlled via "Lambda". The "LossyCompressionAmount" parameter on
// textures is used to control it. Specific LossyCompressionAmount values correspond to
// to RDO lambdas of:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/TextureEncodingSettings.h:58
Scope: file
Source code excerpt:
struct
{
uint32 bSharedLinearTextureEncoding : 1;
uint32 bFinalUsesRDO : 1;
uint32 bFastUsesRDO : 1;
int8 FinalRDOLambda;
int8 FastRDOLambda;
ETextureEncodeEffort FinalEffortLevel;
ETextureUniversalTiling FinalUniversalTiling;