Lyra.DeviceProfile.Mobile.ResolutionQualityRecommendation
Lyra.DeviceProfile.Mobile.ResolutionQualityRecommendation
#Overview
name: Lyra.DeviceProfile.Mobile.ResolutionQualityRecommendation
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
List of limits on resolution quality of the form \
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Lyra.DeviceProfile.Mobile.ResolutionQualityRecommendation is to provide recommendations for resolution quality settings on mobile devices based on frame rate thresholds. It is primarily used for performance optimization in the Lyra game project.
This setting variable is relied upon by the Lyra game module, specifically within the settings subsystem. It’s used in the LyraSettingsLocal.cpp file, which suggests it’s part of the local settings management for the Lyra game.
The value of this variable is set as a console variable (CVar) with a default value of “0:75”. This means that for frame rates of 0 or above, the recommended resolution quality is 75%.
The variable interacts with other performance-related variables, such as CVarMobileQualityLimits and CVarMobileResolutionQualityLimits. It’s part of a broader system for managing graphics quality on mobile devices.
Developers must be aware that this variable accepts a string input in the format “FPS:Recommendation,FPS2:Recommendation2,…”. This allows for multiple recommendations based on different frame rate thresholds.
Best practices when using this variable include:
- Carefully testing different recommendations for various device capabilities.
- Considering the balance between visual quality and performance.
- Updating the recommendations as new mobile hardware becomes available.
Regarding the associated variable CVarMobileResolutionQualityRecommendation:
This is the actual console variable that stores the recommendation values. It’s defined using TAutoConsoleVariable, which allows it to be changed at runtime.
The purpose of CVarMobileResolutionQualityRecommendation is to provide a runtime-accessible way to store and modify the resolution quality recommendations.
It’s used within the LyraSettingsHelpers namespace, where it’s wrapped in a TMobileQualityWrapper for easier querying based on frame rate.
Developers should be aware that changes to this variable will affect the game’s performance and visual quality in real-time. It’s important to provide appropriate default values and allow for runtime tuning for optimal performance across various mobile devices.
Best practices for using CVarMobileResolutionQualityRecommendation include:
- Providing sensible default values that work well across a range of devices.
- Allowing for easy modification during development and testing.
- Considering exposing this setting to advanced users for fine-tuning their experience.
- Documenting the expected format and impact of changes to this variable for other developers on the team.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:95
Scope: file
Source code excerpt:
static TAutoConsoleVariable<FString> CVarMobileResolutionQualityRecommendation(
TEXT("Lyra.DeviceProfile.Mobile.ResolutionQualityRecommendation"),
TEXT("0:75"),
TEXT("List of limits on resolution quality of the form \"FPS:Recommendation,FPS2:Recommendation2,...\", kicking in when FPS is at or above the threshold"),
ECVF_Default | ECVF_Preview);
//////////////////////////////////////////////////////////////////////
#Associated Variable and Callsites
This variable is associated with another variable named CVarMobileResolutionQualityRecommendation
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:94
Scope: file
Source code excerpt:
ECVF_Default | ECVF_Preview);
static TAutoConsoleVariable<FString> CVarMobileResolutionQualityRecommendation(
TEXT("Lyra.DeviceProfile.Mobile.ResolutionQualityRecommendation"),
TEXT("0:75"),
TEXT("List of limits on resolution quality of the form \"FPS:Recommendation,FPS2:Recommendation2,...\", kicking in when FPS is at or above the threshold"),
ECVF_Default | ECVF_Preview);
//////////////////////////////////////////////////////////////////////
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/Settings/LyraSettingsLocal.cpp:282
Scope (from outer to inner):
file
namespace LyraSettingsHelpers
Source code excerpt:
TMobileQualityWrapper<int32> OverallQualityLimits(-1, CVarMobileQualityLimits);
TMobileQualityWrapper<float> ResolutionQualityLimits(100.0f, CVarMobileResolutionQualityLimits);
TMobileQualityWrapper<float> ResolutionQualityRecommendations(75.0f, CVarMobileResolutionQualityRecommendation);
int32 GetApplicableOverallQualityLimit(int32 FrameRate)
{
return OverallQualityLimits.Query(FrameRate);
}