mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-04-24 06:47:44 +02:00
Merge branch 'master_Tweaks' into 'master'
Added: Fix Occlusion Culling See merge request ryubing/ryujinx!18
This commit is contained in:
commit
d8a3c0bff1
10 changed files with 140 additions and 28 deletions
|
@ -5997,6 +5997,56 @@
|
||||||
"zh_TW": "圖形著色器傾印路徑:"
|
"zh_TW": "圖形著色器傾印路徑:"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ID": "DisableFixOcclusionCulling",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "",
|
||||||
|
"de_DE": "",
|
||||||
|
"el_GR": "",
|
||||||
|
"en_US": "Disable Occlusion Culling Fix - flickering of objects.",
|
||||||
|
"es_ES": "",
|
||||||
|
"fr_FR": "",
|
||||||
|
"he_IL": "",
|
||||||
|
"it_IT": "",
|
||||||
|
"ja_JP": "",
|
||||||
|
"ko_KR": "",
|
||||||
|
"no_NO": "",
|
||||||
|
"pl_PL": "",
|
||||||
|
"pt_BR": "",
|
||||||
|
"ru_RU": "",
|
||||||
|
"sv_SE": "",
|
||||||
|
"th_TH": "",
|
||||||
|
"tr_TR": "",
|
||||||
|
"uk_UA": "",
|
||||||
|
"zh_CN": "",
|
||||||
|
"zh_TW": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ID": "DisableFixOcclusionCullingTooltip",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "",
|
||||||
|
"de_DE": "",
|
||||||
|
"el_GR": "",
|
||||||
|
"en_US": "Eliminates visual artifacts in the form of chaotic flickering of objects on the screen.\nThe solution is relevant for games where such an effect is observed (for example, Alan Wake).",
|
||||||
|
"es_ES": "",
|
||||||
|
"fr_FR": "",
|
||||||
|
"he_IL": "",
|
||||||
|
"it_IT": "",
|
||||||
|
"ja_JP": "",
|
||||||
|
"ko_KR": "",
|
||||||
|
"no_NO": "",
|
||||||
|
"pl_PL": "",
|
||||||
|
"pt_BR": "",
|
||||||
|
"ru_RU": "",
|
||||||
|
"sv_SE": "",
|
||||||
|
"th_TH": "",
|
||||||
|
"tr_TR": "",
|
||||||
|
"uk_UA": "",
|
||||||
|
"zh_CN": "",
|
||||||
|
"zh_TW": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ID": "SettingsTabLogging",
|
"ID": "SettingsTabLogging",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
|
|
|
@ -165,6 +165,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||||
Timestamp = ticks,
|
Timestamp = ticks,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!GraphicsConfig.DisableFixOcclusionCulling && result <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (counter?.Invalid != true)
|
if (counter?.Invalid != true)
|
||||||
{
|
{
|
||||||
_channel.MemoryManager.Write(gpuVa, counterData);
|
_channel.MemoryManager.Write(gpuVa, counterData);
|
||||||
|
|
|
@ -72,6 +72,11 @@ namespace Ryujinx.Graphics.Gpu
|
||||||
/// Enables or disables color space passthrough, if available.
|
/// Enables or disables color space passthrough, if available.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool EnableColorSpacePassthrough = false;
|
public static bool EnableColorSpacePassthrough = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enables or disables fix occlusion culling.
|
||||||
|
/// </summary>
|
||||||
|
public static bool DisableFixOcclusionCulling = false;
|
||||||
}
|
}
|
||||||
#pragma warning restore CA2211
|
#pragma warning restore CA2211
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current version of the file format
|
/// The current version of the file format
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const int CurrentVersion = 69;
|
public const int CurrentVersion = 70;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of the configuration file format
|
/// Version of the configuration file format
|
||||||
|
@ -469,6 +469,11 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ulong[] DirtyHacks { get; set; }
|
public ulong[] DirtyHacks { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fixes Occlusion Culling in Games (test feature)
|
||||||
|
/// </summary>
|
||||||
|
public bool DisableFixOcclusionCulling { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads a configuration file from disk
|
/// Loads a configuration file from disk
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -156,6 +156,8 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
Multiplayer.LdnPassphrase.Value = cff.MultiplayerLdnPassphrase;
|
Multiplayer.LdnPassphrase.Value = cff.MultiplayerLdnPassphrase;
|
||||||
Multiplayer.LdnServer.Value = cff.LdnServer;
|
Multiplayer.LdnServer.Value = cff.LdnServer;
|
||||||
|
|
||||||
|
Tweaks.DisableFixOcclusionCulling.Value = cff.DisableFixOcclusionCulling;
|
||||||
|
|
||||||
{
|
{
|
||||||
Hacks.ShowDirtyHacks.Value = cff.ShowDirtyHacks;
|
Hacks.ShowDirtyHacks.Value = cff.ShowDirtyHacks;
|
||||||
|
|
||||||
|
@ -461,7 +463,8 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
TurboModeWhileHeld = false
|
TurboModeWhileHeld = false
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
(69, static cff => cff.SkipUserProfiles = false)
|
(69, static cff => cff.SkipUserProfiles = false),
|
||||||
|
(70, static cff => cff.DisableFixOcclusionCulling = false)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -643,6 +643,21 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tweaks Section
|
||||||
|
/// </summary>
|
||||||
|
public class TweaksSection
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enable or disable Fix Occlusion Culling
|
||||||
|
/// </summary>
|
||||||
|
public ReactiveObject<bool> DisableFixOcclusionCulling { get; private set; }
|
||||||
|
public TweaksSection()
|
||||||
|
{
|
||||||
|
DisableFixOcclusionCulling = new ReactiveObject<bool>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Multiplayer configuration section
|
/// Multiplayer configuration section
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -781,6 +796,11 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GraphicsSection Graphics { get; private set; }
|
public GraphicsSection Graphics { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Tweaks Section
|
||||||
|
/// </summary>
|
||||||
|
public TweaksSection Tweaks { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Hid section
|
/// The Hid section
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -842,6 +862,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
Logger = new LoggerSection();
|
Logger = new LoggerSection();
|
||||||
System = new SystemSection();
|
System = new SystemSection();
|
||||||
Graphics = new GraphicsSection();
|
Graphics = new GraphicsSection();
|
||||||
|
Tweaks = new TweaksSection();
|
||||||
Hid = new HidSection();
|
Hid = new HidSection();
|
||||||
Multiplayer = new MultiplayerSection();
|
Multiplayer = new MultiplayerSection();
|
||||||
Hacks = new HacksSection();
|
Hacks = new HacksSection();
|
||||||
|
|
|
@ -147,6 +147,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
LdnServer = Multiplayer.LdnServer,
|
LdnServer = Multiplayer.LdnServer,
|
||||||
ShowDirtyHacks = Hacks.ShowDirtyHacks,
|
ShowDirtyHacks = Hacks.ShowDirtyHacks,
|
||||||
DirtyHacks = Hacks.EnabledHacks.Select(it => it.Pack()).ToArray(),
|
DirtyHacks = Hacks.EnabledHacks.Select(it => it.Pack()).ToArray(),
|
||||||
|
DisableFixOcclusionCulling = Tweaks.DisableFixOcclusionCulling,
|
||||||
};
|
};
|
||||||
|
|
||||||
return configurationFile;
|
return configurationFile;
|
||||||
|
@ -320,6 +321,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
Tweaks.DisableFixOcclusionCulling.Value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static GraphicsBackend DefaultGraphicsBackend()
|
private static GraphicsBackend DefaultGraphicsBackend()
|
||||||
|
|
|
@ -383,6 +383,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool DisableFixOcclusionCulling { get; set; }
|
||||||
|
|
||||||
public SettingsViewModel(
|
public SettingsViewModel(
|
||||||
VirtualFileSystem virtualFileSystem,
|
VirtualFileSystem virtualFileSystem,
|
||||||
ContentManager contentManager,
|
ContentManager contentManager,
|
||||||
|
@ -659,6 +661,9 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
DisableP2P = config.Multiplayer.DisableP2p;
|
DisableP2P = config.Multiplayer.DisableP2p;
|
||||||
LdnPassphrase = config.Multiplayer.LdnPassphrase;
|
LdnPassphrase = config.Multiplayer.LdnPassphrase;
|
||||||
LdnServer = config.Multiplayer.LdnServer;
|
LdnServer = config.Multiplayer.LdnServer;
|
||||||
|
|
||||||
|
// Tweaks
|
||||||
|
DisableFixOcclusionCulling = config.Tweaks.DisableFixOcclusionCulling.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveSettings()
|
public void SaveSettings()
|
||||||
|
@ -785,6 +790,9 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
config.Hacks.DisableNifmIsAnyInternetRequestAccepted.Value =
|
config.Hacks.DisableNifmIsAnyInternetRequestAccepted.Value =
|
||||||
DirtyHacks.NifmDisableIsAnyInternetRequestAccepted;
|
DirtyHacks.NifmDisableIsAnyInternetRequestAccepted;
|
||||||
|
|
||||||
|
// Tweaks
|
||||||
|
config.Tweaks.DisableFixOcclusionCulling.Value = DisableFixOcclusionCulling;
|
||||||
|
|
||||||
config.ToFileFormat().SaveConfig(Program.ConfigurationPath);
|
config.ToFileFormat().SaveConfig(Program.ConfigurationPath);
|
||||||
|
|
||||||
MainWindow.UpdateGraphicsConfig();
|
MainWindow.UpdateGraphicsConfig();
|
||||||
|
|
|
@ -4,12 +4,25 @@
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
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:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
x:DataType="viewModels:SettingsViewModel">
|
x:DataType="viewModels:SettingsViewModel">
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:SettingsViewModel />
|
<viewModels:SettingsViewModel />
|
||||||
</Design.DataContext>
|
</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
|
<ScrollViewer
|
||||||
Name="HacksPage"
|
Name="HacksPage"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
|
@ -19,41 +32,40 @@
|
||||||
<Border Classes="settings">
|
<Border Classes="settings">
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="10"
|
Margin="10"
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Orientation="Vertical"
|
Orientation="Vertical"
|
||||||
Spacing="5">
|
Spacing="10">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Classes="h1"
|
Classes="h1"
|
||||||
Text="Dirty Hacks" />
|
Text="Dirty Hacks" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
HorizontalAlignment="Center"
|
||||||
Foreground="{DynamicResource SecondaryTextColor}"
|
Foreground="{DynamicResource SecondaryTextColor}"
|
||||||
TextDecorations="Underline"
|
TextDecorations="Underline"
|
||||||
Text="Highly specific hacks & tricks to alleviate performance issues, crashing, or freezing. Can cause issues." />
|
Text="Highly specific hacks & 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/>
|
<Separator/>
|
||||||
<StackPanel
|
<StackPanel Margin="10,0,0,0">
|
||||||
Margin="0,10,0,0"
|
<CheckBox IsChecked="{Binding DirtyHacks.Xc2MenuSoftlockFix}"
|
||||||
Orientation="Horizontal"
|
ToolTip.Tip="{Binding DirtyHacks.Xc2MenuFixTooltip}">
|
||||||
HorizontalAlignment="Center"
|
<StackPanel Orientation="Horizontal">
|
||||||
ToolTip.Tip="{Binding DirtyHacks.NifmDisableIsAnyInternetRequestAcceptedTooltip}">
|
<TextBlock Text="Xenoblade Chronicles 2 Menu Softlock Fix" />
|
||||||
<CheckBox
|
<TextBlock Classes="DefaultDisable" Text="Default: disable" />
|
||||||
Margin="0"
|
</StackPanel>
|
||||||
IsChecked="{Binding DirtyHacks.NifmDisableIsAnyInternetRequestAccepted}"/>
|
</CheckBox>
|
||||||
<TextBlock
|
<CheckBox IsChecked="{Binding DirtyHacks.NifmDisableIsAnyInternetRequestAccepted}"
|
||||||
VerticalAlignment="Center"
|
ToolTip.Tip="{Binding DirtyHacks.NifmDisableIsAnyInternetRequestAcceptedTooltip}">
|
||||||
Text="Disable IsAnyInternetRequestAccepted" />
|
<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>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
|
@ -569,6 +569,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
GraphicsConfig.EnableShaderCache = ConfigurationState.Instance.Graphics.EnableShaderCache;
|
GraphicsConfig.EnableShaderCache = ConfigurationState.Instance.Graphics.EnableShaderCache;
|
||||||
GraphicsConfig.EnableTextureRecompression = ConfigurationState.Instance.Graphics.EnableTextureRecompression;
|
GraphicsConfig.EnableTextureRecompression = ConfigurationState.Instance.Graphics.EnableTextureRecompression;
|
||||||
GraphicsConfig.EnableMacroHLE = ConfigurationState.Instance.Graphics.EnableMacroHLE;
|
GraphicsConfig.EnableMacroHLE = ConfigurationState.Instance.Graphics.EnableMacroHLE;
|
||||||
|
GraphicsConfig.DisableFixOcclusionCulling = ConfigurationState.Instance.Tweaks.DisableFixOcclusionCulling;
|
||||||
#pragma warning restore IDE0055
|
#pragma warning restore IDE0055
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue