Compare commits

...

3 commits

Author SHA1 Message Date
Goodfeat
343e2e144c Merge branch 'master_Tweaks' into 'master'
Added: Fix Occlusion Culling

See merge request ryubing/ryujinx!18
2025-04-18 21:48:51 -05:00
Vova
b151828228 Renamed to Disable Occlusion Culling Fix 2025-04-19 12:48:36 +10:00
Vova
83a13e8f35 Removed the tweaks tab. The function has been moved to the Dirty Hacks section. The function has been renamed to DisableFixOcclusionCulling.
By default, it fixes the occlusion issue
2025-04-19 12:41:22 +10:00
16 changed files with 51 additions and 209 deletions

View file

@ -5998,87 +5998,12 @@
}
},
{
"ID": "SettingsTabTweaks",
"Translations": {
"ar_SA": "باتشات",
"de_DE": "Tweaks",
"el_GR": "Patches",
"en_US": "Tweaks",
"es_ES": "Parches",
"fr_FR": "Patches",
"he_IL": "פאצ'ים",
"it_IT": "Tweaks",
"ja_JP": "パッチ",
"ko_KR": "패치",
"no_NO": "Patcher",
"pl_PL": "Tweak'i",
"pt_BR": "Patches",
"ru_RU": "Твики",
"sv_SE": "Patcher",
"th_TH": "แพตช์",
"tr_TR": "Tweaks",
"uk_UA": "Твіки",
"zh_CN": "补丁",
"zh_TW": "補丁"
}
},
{
"ID": "SettingsTabTweaksTitle",
"Translations": {
"ar_SA": "باتشات: تجارب وتحديثات",
"de_DE": "Tweaks: Experimente & Patches",
"el_GR": "Patches: Πειράματα & Διορθώσεις",
"en_US": "Tweaks: Experiments & Patches",
"es_ES": "Parches: Experimentos y Ajustes",
"fr_FR": "Patches : Expériences et Corrections",
"he_IL": "פאצ'ים: ניסויים ותיקונים",
"it_IT": "Tweaks: Esperimenti e Patch",
"ja_JP": "パッチ: 実験と修正",
"ko_KR": "패치: 실험 및 수정",
"no_NO": "Patcher: Eksperimenter og Utbedringer",
"pl_PL": "Tweak'i: Eksperymenty i Łatki",
"pt_BR": "Patches: Experimentos e Correções",
"ru_RU": "Твики: Эксперименты и Патчи",
"sv_SE": "Patcher: Experiment och Korrigeringar",
"th_TH": "แพตช์: การทดลองและการแก้ไข",
"tr_TR": "Tweaks: Deneyler ve Yamalar",
"uk_UA": "Твіки: Експерименти та Патчі",
"zh_CN": "补丁:实验与修复",
"zh_TW": "補丁:實驗與修復"
}
},
{
"ID": "SettingsTabTweaksDescription",
"Translations": {
"ar_SA": "تحذير! يجب تغيير هذه الخيارات فقط إذا كانت لعبتك لا تعمل بشكل صحيح.",
"de_DE": "Warnung! Diese Optionen sollten nur geändert werden, wenn dein Spiel nicht ordnungsgemäß funktioniert.",
"el_GR": "Προειδοποίηση! Αυτές οι ρυθμίσεις πρέπει να αλλάξουν μόνο αν το παιχνίδι σας δεν λειτουργεί σωστά.",
"en_US": "Warning! These options should only be changed if your game is not working properly.",
"es_ES": "Advertencia! Estas opciones deben cambiarse solo si tu juego no funciona correctamente.",
"fr_FR": "Avertissement! Ces options doivent être modifiées uniquement si votre jeu ne fonctionne pas correctement.",
"he_IL": "אזהרה! יש לשנות את האפשרויות הללו רק אם המשחק שלך לא פועל כראוי.",
"it_IT": "Avviso! Queste opzioni devono essere modificate solo se il tuo gioco non funziona correttamente.",
"ja_JP": "警告! ゲームが正常に動作しない場合にのみ、これらのオプションを変更してください。",
"ko_KR": "경고! 게임이 제대로 작동하지 않으면 이 옵션들을 변경해야 합니다.",
"no_NO": "Advarsel! Disse alternativene bør kun endres hvis spillet ditt ikke fungerer som det skal.",
"pl_PL": "Ostrzeżenie! Te opcje należy zmienić tylko wtedy, gdy twoja gra nie działa poprawnie.",
"pt_BR": "Aviso! Essas opções devem ser alteradas apenas se o seu jogo não estiver funcionando corretamente.",
"ru_RU": "Предупреждение! Эти параметры следует изменить только в случае, если ваша игра работает неправильно.",
"sv_SE": "Varning! Dessa alternativ bör endast ändras om ditt spel inte fungerar som det ska.",
"th_TH": "คำเตือน! ควรเปลี่ยนตัวเลือกเหล่านี้เฉพาะในกรณีที่เกมของคุณทำงานไม่ถูกต้อง.",
"tr_TR": "Uyarı! Bu seçenekler, oyununuz düzgün çalışmıyorsa yalnızca değiştirilmelidir.",
"uk_UA": "Попередження! Ці налаштування слід змінити лише в тому випадку, якщо ваша гра не працює належним чином.",
"zh_CN": "警告! 只有在游戏无法正常运行的情况下,请更改这些选项。",
"zh_TW": "警告! 只有當遊戲無法正常運行時,請更改這些選項。"
}
},
{
"ID": "FixOcclusionCulling",
"ID": "DisableFixOcclusionCulling",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Fix Occlusion Culling - flickering of objects.",
"en_US": "Disable Occlusion Culling Fix - flickering of objects.",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
@ -6098,7 +6023,7 @@
}
},
{
"ID": "FixOcclusionCullingTooltip",
"ID": "DisableFixOcclusionCullingTooltip",
"Translations": {
"ar_SA": "",
"de_DE": "",

View file

@ -165,7 +165,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
Timestamp = ticks,
};
if (GraphicsConfig.FixOcclusionCulling && result <= 0)
if (!GraphicsConfig.DisableFixOcclusionCulling && result <= 0)
{
return;
}

View file

@ -76,7 +76,7 @@ namespace Ryujinx.Graphics.Gpu
/// <summary>
/// Enables or disables fix occlusion culling.
/// </summary>
public static bool FixOcclusionCulling = true;
public static bool DisableFixOcclusionCulling = true;
}
#pragma warning restore CA2211
}

View file

@ -472,7 +472,7 @@ namespace Ryujinx.Ava.Systems.Configuration
/// <summary>
/// Fixes Occlusion Culling in Games (test feature)
/// </summary>
public bool FixOcclusionCulling { get; set; }
public bool DisableFixOcclusionCulling { get; set; }
/// <summary>
/// Loads a configuration file from disk

View file

@ -156,7 +156,7 @@ namespace Ryujinx.Ava.Systems.Configuration
Multiplayer.LdnPassphrase.Value = cff.MultiplayerLdnPassphrase;
Multiplayer.LdnServer.Value = cff.LdnServer;
Tweaks.FixOcclusionCulling.Value = cff.FixOcclusionCulling;
Tweaks.DisableFixOcclusionCulling.Value = cff.DisableFixOcclusionCulling;
{
Hacks.ShowDirtyHacks.Value = cff.ShowDirtyHacks;
@ -464,7 +464,7 @@ namespace Ryujinx.Ava.Systems.Configuration
};
}),
(69, static cff => cff.SkipUserProfiles = false),
(70, static cff => cff.FixOcclusionCulling = false)
(70, static cff => cff.DisableFixOcclusionCulling = false)
);
}
}

View file

@ -651,10 +651,10 @@ namespace Ryujinx.Ava.Systems.Configuration
/// <summary>
/// Enable or disable Fix Occlusion Culling
/// </summary>
public ReactiveObject<bool> FixOcclusionCulling { get; private set; }
public ReactiveObject<bool> DisableFixOcclusionCulling { get; private set; }
public TweaksSection()
{
FixOcclusionCulling = new ReactiveObject<bool>();
DisableFixOcclusionCulling = new ReactiveObject<bool>();
}
}

View file

@ -147,7 +147,7 @@ namespace Ryujinx.Ava.Systems.Configuration
LdnServer = Multiplayer.LdnServer,
ShowDirtyHacks = Hacks.ShowDirtyHacks,
DirtyHacks = Hacks.EnabledHacks.Select(it => it.Pack()).ToArray(),
FixOcclusionCulling = Tweaks.FixOcclusionCulling,
DisableFixOcclusionCulling = Tweaks.DisableFixOcclusionCulling,
};
return configurationFile;
@ -321,7 +321,7 @@ namespace Ryujinx.Ava.Systems.Configuration
},
}
];
Tweaks.FixOcclusionCulling.Value = true;
Tweaks.DisableFixOcclusionCulling.Value = true;
}
private static GraphicsBackend DefaultGraphicsBackend()

View file

@ -383,7 +383,7 @@ namespace Ryujinx.Ava.UI.ViewModels
}
}
public bool FixOcclusionCulling { get; set; }
public bool DisableFixOcclusionCulling { get; set; }
public SettingsViewModel(
VirtualFileSystem virtualFileSystem,
@ -663,7 +663,7 @@ namespace Ryujinx.Ava.UI.ViewModels
LdnServer = config.Multiplayer.LdnServer;
// Tweaks
FixOcclusionCulling = config.Tweaks.FixOcclusionCulling.Value;
DisableFixOcclusionCulling = config.Tweaks.DisableFixOcclusionCulling.Value;
}
public void SaveSettings()
@ -791,7 +791,7 @@ namespace Ryujinx.Ava.UI.ViewModels
DirtyHacks.NifmDisableIsAnyInternetRequestAccepted;
// Tweaks
config.Tweaks.FixOcclusionCulling.Value = FixOcclusionCulling;
config.Tweaks.DisableFixOcclusionCulling.Value = DisableFixOcclusionCulling;
config.ToFileFormat().SaveConfig(Program.ConfigurationPath);

View file

@ -4,12 +4,25 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel">
<Design.DataContext>
<viewModels:SettingsViewModel />
</Design.DataContext>
<UserControl.Styles>
<Style Selector="TextBlock.DefaultEnable" >
<Setter Property="Foreground" Value="SeaGreen"/>
<Setter Property="Margin" Value="5,0,0,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style Selector="TextBlock.DefaultDisable" >
<Setter Property="Foreground" Value="IndianRed"/>
<Setter Property="Margin" Value="5,0,0,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
</UserControl.Styles>
<ScrollViewer
Name="HacksPage"
HorizontalAlignment="Stretch"
@ -19,7 +32,6 @@
<Border Classes="settings">
<StackPanel
Margin="10"
HorizontalAlignment="Center"
Orientation="Vertical"
Spacing="5">
<TextBlock
@ -27,34 +39,32 @@
Classes="h1"
Text="Dirty Hacks" />
<TextBlock
HorizontalAlignment="Center"
Foreground="{DynamicResource SecondaryTextColor}"
TextDecorations="Underline"
Text="Highly specific hacks &amp; tricks to alleviate performance issues, crashing, or freezing. Can cause issues." />
<StackPanel
Margin="0,10,0,0"
Orientation="Horizontal"
HorizontalAlignment="Center"
ToolTip.Tip="{Binding DirtyHacks.Xc2MenuFixTooltip}">
<CheckBox
Margin="0"
IsChecked="{Binding DirtyHacks.Xc2MenuSoftlockFix}"/>
<TextBlock
VerticalAlignment="Center"
Text="Xenoblade Chronicles 2 Menu Softlock Fix" />
</StackPanel>
<Separator/>
<StackPanel
Margin="0,10,0,0"
Orientation="Horizontal"
HorizontalAlignment="Center"
<Separator/>
<CheckBox IsChecked="{Binding DirtyHacks.Xc2MenuSoftlockFix}"
ToolTip.Tip="{Binding DirtyHacks.Xc2MenuFixTooltip}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Xenoblade Chronicles 2 Menu Softlock Fix" />
<TextBlock Classes="DefaultDisable" Text="Default: disable" />
</StackPanel>
</CheckBox>
<CheckBox IsChecked="{Binding DirtyHacks.NifmDisableIsAnyInternetRequestAccepted}"
ToolTip.Tip="{Binding DirtyHacks.NifmDisableIsAnyInternetRequestAcceptedTooltip}">
<CheckBox
Margin="0"
IsChecked="{Binding DirtyHacks.NifmDisableIsAnyInternetRequestAccepted}"/>
<TextBlock
VerticalAlignment="Center"
Text="Disable IsAnyInternetRequestAccepted" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Disable IsAnyInternetRequestAccepted" />
<TextBlock Classes="DefaultDisable" Text="Default: disable" />
</StackPanel>
</CheckBox>
<CheckBox IsChecked="{Binding DisableFixOcclusionCulling}"
ToolTip.Tip="{ext:Locale DisableFixOcclusionCullingTooltip}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{ext:Locale DisableFixOcclusionCulling}" />
<TextBlock Classes="DefaultDisable" Text="Default: disable" />
</StackPanel>
</CheckBox>
</StackPanel>
</Border>
</ScrollViewer>

View file

@ -1,65 +0,0 @@
<UserControl
x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsTweaksView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel"
x:CompileBindings="True"
Focusable="True">
<Design.DataContext>
<viewModels:SettingsViewModel />
</Design.DataContext>
<UserControl.Styles>
<Style Selector="TextBlock.DefaultEnable" >
<Setter Property="Foreground" Value="SeaGreen"/>
<Setter Property="Margin" Value="5,0,0,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style Selector="TextBlock.DefaultDisable" >
<Setter Property="Foreground" Value="IndianRed"/>
<Setter Property="Margin" Value="5,0,0,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
</UserControl.Styles>
<ScrollViewer
Name="HotkeysPage"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto">
<Border Classes="settings">
<StackPanel
Name="SettingButtons"
Margin="10"
Orientation="Vertical"
Spacing="10">
<TextBlock
HorizontalAlignment="Center"
Classes="h1"
Text="{ext:Locale SettingsTabTweaksTitle}" />
<TextBlock
HorizontalAlignment="Center"
Foreground="{DynamicResource SecondaryTextColor}"
TextDecorations="Underline"
Text="{ext:Locale SettingsTabTweaksDescription}" />
<Separator/>
<StackPanel Orientation="Vertical">
<CheckBox IsChecked="{Binding FixOcclusionCulling}"
ToolTip.Tip="{ext:Locale FixOcclusionCullingTooltip}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{ext:Locale FixOcclusionCulling}" />
<TextBlock Classes="DefaultEnable" Text="Default: enable" />
</StackPanel>
</CheckBox>
</StackPanel>
</StackPanel>
</Border>
</ScrollViewer>
</UserControl>

View file

@ -1,12 +0,0 @@
using Avalonia.Controls;
namespace Ryujinx.Ava.UI.Views.Settings
{
public partial class SettingsTweaksView : UserControl
{
public SettingsTweaksView()
{
InitializeComponent();
}
}
}

View file

@ -34,7 +34,6 @@
<settings:SettingsSystemView Name="SystemPage" />
<settings:SettingsCPUView Name="CpuPage" />
<settings:SettingsGraphicsView Name="GraphicsPage" />
<settings:SettingsTweaksView Name="TweaksPage" />
<settings:SettingsAudioView Name="AudioPage" />
<settings:SettingsNetworkView Name="NetworkPage" />
<settings:SettingsLoggingView Name="LoggingPage" />
@ -102,10 +101,6 @@
Content="{ext:Locale SettingsTabGraphics}"
Tag="GraphicsPage"
IconSource="Image" />
<ui:NavigationViewItem
Content="{ext:Locale SettingsTabTweaks}"
Tag="TweaksPage"
IconSource="Repair" />
<ui:NavigationViewItem
Content="{ext:Locale SettingsTabAudio}"
IconSource="Audio"

View file

@ -70,9 +70,6 @@ namespace Ryujinx.Ava.UI.Windows
case nameof(GraphicsPage):
NavPanel.Content = GraphicsPage;
break;
case nameof(TweaksPage):
NavPanel.Content = TweaksPage;
break;
case nameof(AudioPage):
NavPanel.Content = AudioPage;
break;

View file

@ -569,7 +569,7 @@ namespace Ryujinx.Ava.UI.Windows
GraphicsConfig.EnableShaderCache = ConfigurationState.Instance.Graphics.EnableShaderCache;
GraphicsConfig.EnableTextureRecompression = ConfigurationState.Instance.Graphics.EnableTextureRecompression;
GraphicsConfig.EnableMacroHLE = ConfigurationState.Instance.Graphics.EnableMacroHLE;
GraphicsConfig.FixOcclusionCulling = ConfigurationState.Instance.Tweaks.FixOcclusionCulling;
GraphicsConfig.DisableFixOcclusionCulling = ConfigurationState.Instance.Tweaks.DisableFixOcclusionCulling;
#pragma warning restore IDE0055
}

View file

@ -43,7 +43,6 @@
<settings:SettingsSystemView Name="SystemPage" />
<settings:SettingsCPUView Name="CpuPage" />
<settings:SettingsGraphicsView Name="GraphicsPage" />
<settings:SettingsTweaksView Name="TweaksPage" />
<settings:SettingsAudioView Name="AudioPage" />
<settings:SettingsNetworkView Name="NetworkPage" />
<settings:SettingsLoggingView Name="LoggingPage" />
@ -89,10 +88,6 @@
Content="{ext:Locale SettingsTabGraphics}"
Tag="GraphicsPage"
IconSource="Image" />
<ui:NavigationViewItem
Content="{ext:Locale SettingsTabTweaks}"
Tag="TweaksPage"
IconSource="Repair" />
<ui:NavigationViewItem
Content="{ext:Locale SettingsTabAudio}"
IconSource="Audio"

View file

@ -88,9 +88,6 @@ namespace Ryujinx.Ava.UI.Windows
case "GraphicsPage":
NavPanel.Content = GraphicsPage;
break;
case "TweaksPage":
NavPanel.Content = TweaksPage;
break;
case "AudioPage":
NavPanel.Content = AudioPage;
break;