r.DetailedMipAlphaLogging
r.DetailedMipAlphaLogging
#Overview
name: r.DetailedMipAlphaLogging
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Prints extra log messages for tracking when alpha gets removed/introduced during textureimage processing.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.DetailedMipAlphaLogging is to control the logging of detailed information about alpha changes during texture image processing, specifically for mip map generation.
This setting variable is primarily used in the TextureCompressor module of Unreal Engine. It’s part of the rendering system, specifically the texture processing pipeline.
The value of this variable is set through a console variable (CVarDetailedMipAlphaLogging) defined in the TextureCompressorModule.cpp file. It’s initialized with a default value of 0, meaning the detailed logging is disabled by default.
The associated variable CVarDetailedMipAlphaLogging directly interacts with r.DetailedMipAlphaLogging. They share the same value and purpose.
Developers should be aware that enabling this variable (by setting it to a non-zero value) will increase the verbosity of logging during texture compression, which could impact performance if used in a production environment. It’s primarily intended for debugging and development purposes.
Best practices for using this variable include:
- Only enable it when investigating specific issues related to alpha channel processing in textures.
- Remember to disable it after debugging to avoid unnecessary performance overhead.
- Use it in conjunction with other texture-related debugging tools for a comprehensive analysis.
Regarding the associated variable CVarDetailedMipAlphaLogging:
- It’s an instance of TAutoConsoleVariable
, which allows for runtime modification of the setting. - It’s used in the FTextureCompressorModule class to determine whether to perform detailed alpha logging.
- The value is retrieved using GetValueOnAnyThread(), suggesting it’s designed to be thread-safe.
- Developers should use this variable to check the current state of detailed alpha logging before performing intensive logging operations.
When working with either r.DetailedMipAlphaLogging or CVarDetailedMipAlphaLogging, developers should consider the potential performance impact and use it judiciously during development and debugging phases.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Developer/TextureCompressor/Private/TextureCompressorModule.cpp:27
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarDetailedMipAlphaLogging(
TEXT("r.DetailedMipAlphaLogging"),
0,
TEXT("Prints extra log messages for tracking when alpha gets removed/introduced during texture")
TEXT("image processing.")
);
DEFINE_LOG_CATEGORY_STATIC(LogTextureCompressor, Log, All);
#Associated Variable and Callsites
This variable is associated with another variable named CVarDetailedMipAlphaLogging
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Developer/TextureCompressor/Private/TextureCompressorModule.cpp:26
Scope: file
Source code excerpt:
#endif
static TAutoConsoleVariable<int32> CVarDetailedMipAlphaLogging(
TEXT("r.DetailedMipAlphaLogging"),
0,
TEXT("Prints extra log messages for tracking when alpha gets removed/introduced during texture")
TEXT("image processing.")
);
#Loc: <Workspace>/Engine/Source/Developer/TextureCompressor/Private/TextureCompressorModule.cpp:3791
Scope (from outer to inner):
file
class class FTextureCompressorModule : public ITextureCompressorModule
function virtual bool BuildTexture
Source code excerpt:
}
const bool bDoDetailedAlphaLogging = CVarDetailedMipAlphaLogging.GetValueOnAnyThread() != 0;
// @todo Oodle: option to dump the Source image here
// we have dump in TextureFormatOodle for the after-processing (before encoding) image
// get a dump spot for before-processing as well
TArray<FImage> IntermediateMipChain;
#Loc: <Workspace>/Engine/Source/Developer/TextureCompressor/Private/TextureCompressorModule.cpp:4008
Scope (from outer to inner):
file
class class FTextureCompressorModule : public ITextureCompressorModule
function bool BuildTextureMips
Source code excerpt:
}
const bool bDoDetailedAlphaLogging = CVarDetailedMipAlphaLogging.GetValueOnAnyThread() != 0;
// handling of bLongLatCubemap seems overly complicated
// what it should do is convert it right at the start here
// then treat it as a standard cubemap below, no special cases
// but that will change output :(