Skip to content

Commit

Permalink
Add placeholder field for DLSS in HSR 3.0
Browse files Browse the repository at this point in the history
The var names will need to be updated when HSR 3.0 releases so that we write the correct var name in registry.
  • Loading branch information
Cryotechnic committed Jan 8, 2025
1 parent de9b7c9 commit 5c68c03
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ public enum AntialiasingMode
TAA = 1,
FXAA = 2
}

public enum DLSSMode
{
Off = 0,
UltraHighPerformance = 1,
Performance = 2,
Balanced = 3,
Quality = 4,
DLAA = 5
}

#endregion

internal class Model : IGameSettingsValue<Model>
Expand Down Expand Up @@ -218,12 +229,18 @@ private static Dictionary<int, int> GenerateStaticFPSIndexDict()
public Quality ReflectionQuality { get; set; } = Quality.VeryLow;

/// <summary>
/// This defines "<c>SFX Quality</c>" combobox In-game settings. <br/>>
/// This defines "<c>SFX Quality</c>" combobox In-game settings. <br/>
/// Options: VeryLow (1), Low (2), Medium(3), High(4) <br/>
/// Default: High (I believe it's a mistake by miHoYo)
/// </summary>
public Quality SFXQuality { get; set; } = Quality.High;


/// <summary>
/// This defines "<c>Nvidia DLSS</c>" combobox In-game settings. <br/>
/// Options: Off (0), UltraHighPerformance (1), Performance (2), Balanced (3), Quality (4), DLAA (5) <br/>
/// Default: Off <br/>
/// </summary>
public DLSSMode DLSSQuality { get; set; } = DLSSMode.Off;
/// <summary>
/// This defines "<c>Bloom Quality</c>" combobox In-game settings. <br/>
/// Options: Off(0), VeryLow (1), Low (2), Medium(3), High(4), VeryHigh(5) <br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,13 @@ public int SFXQuality
get => Math.Clamp((int)Settings.GraphicsSettings.SFXQuality, 1, 4);
set => Settings.GraphicsSettings.SFXQuality = (Quality)value;
}

//DLSSQuality
public int DLSSQuality
{
get => Math.Clamp((int)Settings.GraphicsSettings.DLSSQuality, 0, 5);
set => Settings.GraphicsSettings.DLSSQuality = (DLSSMode)value;
}
//BloomQuality
public int BloomQuality
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,27 @@
Visibility="Collapsed" />
</ComboBox>
</StackPanel>
<StackPanel Grid.Column="2"
VerticalAlignment="Bottom">
<TextBlock MaxWidth="128"
Margin="0,8,0,8"
HorizontalAlignment="Left"
Style="{ThemeResource BodyStrongTextBlockStyle}"
Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_DLSSQualityMode}"
TextWrapping="Wrap" />
<ComboBox x:Name="DLSSQualitySelector"
Margin="0,0,16,8"
HorizontalAlignment="Stretch"
CornerRadius="14"
SelectedIndex="{x:Bind DLSSQuality, Mode=TwoWay}">
<ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" />
<ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_DLSS_UHP}" />
<ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_DLSS_Perf}" />
<ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_DLSS_Balanced}" />
<ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_DLSS_Quality}" />
<ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_DLSS_DLAA}" />
</ComboBox>
</StackPanel>
</Grid>
</StackPanel>
<StackPanel>
Expand Down
6 changes: 6 additions & 0 deletions Hi3Helper.Core/Lang/Locale/LangStarRailGameSettingsPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public sealed partial class LangStarRailGameSettingsPage
public string Graphics_BloomQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_BloomQuality;
public string Graphics_SFXQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_SFXQuality;
public string Graphics_AAMode { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_AAMode;
public string Graphics_DLSSQualityMode { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_DLSSQualityMode;
public string Graphics_SpecPanel { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_SpecPanel;
public string Graphics_SelfShadow { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_SelfShadow;
public string Graphics_HalfResTransparent { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_HalfResTransparent;
Expand All @@ -75,6 +76,11 @@ public sealed partial class LangStarRailGameSettingsPage
public string SpecMedium { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecMedium;
public string SpecHigh { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecHigh;
public string SpecVeryHigh { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecVeryHigh;
public string Graphics_DLSS_UHP { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_DLSS_UHP;
public string Graphics_DLSS_Perf { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_DLSS_Perf;
public string Graphics_DLSS_Balanced { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_DLSS_Balanced;
public string Graphics_DLSS_Quality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_DLSS_Quality;
public string Graphics_DLSS_DLAA { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_DLSS_DLAA;
}
}
#endregion
Expand Down
9 changes: 8 additions & 1 deletion Hi3Helper.Core/Lang/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
"CustomArgs_Footer2": "Unity Standalone Player command line documentation",
"CustomArgs_Footer3": "to see more parameters.",

"GameBoost": "Boost Game Priority [Experimental]",
"GameBoost": "Boost Game Priority",
"MobileLayout": "Use Mobile Layout",

"Advanced_Title": "Advanced Settings",
Expand Down Expand Up @@ -1238,8 +1238,15 @@
"Graphics_BloomQuality": "Bloom Quality",
"Graphics_AAMode": "Anti-Aliasing Mode",
"Graphics_SFXQuality": "SFX Quality",
"Graphics_DLSSQualityMode": "Nvidia DLSS Mode",
"Graphics_SelfShadow": "Character Shadow in Map Exploration",
"Graphics_HalfResTransparent": "Half Resolution Transparency",

"Graphics_DLSS_UHP": "Ultra High Perf.",
"Graphics_DLSS_Perf": "Performance",
"Graphics_DLSS_Balanced": "Balanced",
"Graphics_DLSS_Quality": "Quality",
"Graphics_DLSS_DLAA": "DLAA",

"Graphics_SpecPanel": "Global Graphics Settings",
"SpecEnabled": "Enabled",
Expand Down

0 comments on commit 5c68c03

Please sign in to comment.