From 26a70f4abf47ec4c701d9828c32e90272a3bf356 Mon Sep 17 00:00:00 2001 From: Extravi <98912029+Extravi@users.noreply.github.com> Date: Sun, 5 Mar 2023 18:55:45 -0500 Subject: [PATCH 1/5] fixed reshade support --- Bloxstrap/Helpers/Integrations/ReShade.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Bloxstrap/Helpers/Integrations/ReShade.cs b/Bloxstrap/Helpers/Integrations/ReShade.cs index eacc91d..75b0c96 100644 --- a/Bloxstrap/Helpers/Integrations/ReShade.cs +++ b/Bloxstrap/Helpers/Integrations/ReShade.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -42,6 +42,7 @@ namespace Bloxstrap.Helpers.Integrations { "Stock", "https://github.com/crosire/reshade-shaders/archive/refs/heads/master.zip" }, // shaders required for extravi's presets: + { "Legacy", "https://github.com/crosire/reshade-shaders/archive/refs/heads/legacy.zip" }, { "AlucardDH", "https://github.com/AlucardDH/dh-reshade-shaders/archive/refs/heads/master.zip" }, { "AstrayFX", "https://github.com/BlueSkyDefender/AstrayFX/archive/refs/heads/master.zip" }, { "Depth3D", "https://github.com/BlueSkyDefender/Depth3D/archive/refs/heads/master.zip" }, @@ -49,10 +50,13 @@ namespace Bloxstrap.Helpers.Integrations { "NiceGuy", "https://github.com/mj-ehsan/NiceGuy-Shaders/archive/refs/heads/main.zip" }, { "prod80", "https://github.com/prod80/prod80-ReShade-Repository/archive/refs/heads/master.zip" }, { "qUINT", "https://github.com/martymcmodding/qUINT/archive/refs/heads/master.zip" }, + { "SweetFX", "https://github.com/CeeJayDK/SweetFX/archive/refs/heads/master.zip" }, + { "Brussell", "https://github.com/brussell1/Shaders/archive/refs/heads/master.zip" }, }; private static readonly string[] ExtraviPresetsShaders = new string[] { + "Legacy", "AlucardDH", "AstrayFX", "Depth3D", @@ -60,6 +64,8 @@ namespace Bloxstrap.Helpers.Integrations "NiceGuy", "prod80", "qUINT", + "SweetFX", + "Brussell", }; private static string GetSearchPath(string type, string name) From 1bfef1ee010c137e802f3e640fd644cd4d258a52 Mon Sep 17 00:00:00 2001 From: Extravi <98912029+Extravi@users.noreply.github.com> Date: Sun, 5 Mar 2023 21:11:53 -0500 Subject: [PATCH 2/5] Update ReShade.cs --- Bloxstrap/Helpers/Integrations/ReShade.cs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Bloxstrap/Helpers/Integrations/ReShade.cs b/Bloxstrap/Helpers/Integrations/ReShade.cs index 75b0c96..3d665c3 100644 --- a/Bloxstrap/Helpers/Integrations/ReShade.cs +++ b/Bloxstrap/Helpers/Integrations/ReShade.cs @@ -42,6 +42,7 @@ namespace Bloxstrap.Helpers.Integrations { "Stock", "https://github.com/crosire/reshade-shaders/archive/refs/heads/master.zip" }, // shaders required for extravi's presets: + { "Stormshade","https://github.com/cyrie/Stormshade/archive/refs/heads/master.zip" }, { "Legacy", "https://github.com/crosire/reshade-shaders/archive/refs/heads/legacy.zip" }, { "AlucardDH", "https://github.com/AlucardDH/dh-reshade-shaders/archive/refs/heads/master.zip" }, { "AstrayFX", "https://github.com/BlueSkyDefender/AstrayFX/archive/refs/heads/master.zip" }, @@ -56,6 +57,7 @@ namespace Bloxstrap.Helpers.Integrations private static readonly string[] ExtraviPresetsShaders = new string[] { + "Stormshade", "Legacy", "AlucardDH", "AstrayFX", @@ -197,16 +199,30 @@ namespace Bloxstrap.Helpers.Integrations continue; // github branch zips have a root folder of the name of the branch, so let's just remove that - string fullPath = entry.FullName.Substring(entry.FullName.IndexOf('/') + 1); + string fullPath; + if (entry.FullName.Contains("Stormshade-master")) + { + fullPath = entry.FullName.Substring(entry.FullName.IndexOf("reshade-shaders/") + "reshade-shaders/".Length); + } + else + { + fullPath = entry.FullName.Substring(entry.FullName.IndexOf('/') + 1); + } // skip file if it's not in the Shaders or Textures folder if (!fullPath.StartsWith("Shaders") && !fullPath.StartsWith("Textures")) continue; // ingore shaders with compiler errors - if (fullPath.EndsWith("dh_Lain.fx") || fullPath.EndsWith("dh_rtgi.fx")) + if (fullPath.EndsWith("dh_Lain.fx") || fullPath.EndsWith("dh_rtgi.fx") || fullPath.EndsWith("DOF.fx") || fullPath.EndsWith("FXAA.fx") || fullPath.EndsWith("FXAA.fxh")) continue; + if (entry.FullName.Contains("Stormshade-master")) + { + if (fullPath.EndsWith("Clarity.fx") || fullPath.EndsWith("AmbientLight.fx")) + continue; + } + // and now we do it again because of how we're handling folder management // e.g. reshade-shaders-master/Shaders/Vignette.fx should go to ReShade/Shaders/Stock/Vignette.fx // so in this case, relativePath should just be "Vignette.fx" @@ -284,7 +300,7 @@ namespace Bloxstrap.Helpers.Integrations { App.Logger.WriteLine("[ReShade::InstallExtraviPresets] Installing Extravi's presets..."); - foreach (string name in ExtraviPresetsShaders) + foreach (string name in ExtraviPresetsShaders) await DownloadShaders(name); byte[] bytes = await App.HttpClient.GetByteArrayAsync($"{BaseUrl}/reshade-presets.zip"); From 2eea58f4727d868fd66bb5d385c7248482b672ec Mon Sep 17 00:00:00 2001 From: Extravi <98912029+Extravi@users.noreply.github.com> Date: Sun, 5 Mar 2023 21:12:42 -0500 Subject: [PATCH 3/5] Update ReShade.cs --- Bloxstrap/Helpers/Integrations/ReShade.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Bloxstrap/Helpers/Integrations/ReShade.cs b/Bloxstrap/Helpers/Integrations/ReShade.cs index 3d665c3..7b64ae1 100644 --- a/Bloxstrap/Helpers/Integrations/ReShade.cs +++ b/Bloxstrap/Helpers/Integrations/ReShade.cs @@ -85,7 +85,7 @@ namespace Bloxstrap.Helpers.Integrations using MemoryStream zipStream = new(bytes); using ZipArchive archive = new(zipStream); - + archive.Entries.First(x => x.FullName == "ReShade.ini").ExtractToFile(ConfigLocation, true); // when we extract the file we have to make sure the last modified date is overwritten @@ -300,7 +300,7 @@ namespace Bloxstrap.Helpers.Integrations { App.Logger.WriteLine("[ReShade::InstallExtraviPresets] Installing Extravi's presets..."); - foreach (string name in ExtraviPresetsShaders) + foreach (string name in ExtraviPresetsShaders) await DownloadShaders(name); byte[] bytes = await App.HttpClient.GetByteArrayAsync($"{BaseUrl}/reshade-presets.zip"); @@ -342,7 +342,7 @@ namespace Bloxstrap.Helpers.Integrations public static async Task CheckModifications() { App.Logger.WriteLine("[ReShade::CheckModifications] Checking ReShade modifications..."); - + string injectorLocation = Path.Combine(Directories.Modifications, "dxgi.dll"); if (!App.Settings.Prop.UseReShadeExtraviPresets && !String.IsNullOrEmpty(App.State.Prop.ExtraviReShadePresetsVersion)) @@ -362,7 +362,7 @@ namespace Bloxstrap.Helpers.Integrations return; App.Logger.WriteLine("[ReShade::CheckModifications] ReShade is not enabled"); - + // we should already be uninstalled // we want to ensure this is done one-time only as this could possibly interfere with other rendering hooks using dxgi.dll if (String.IsNullOrEmpty(App.State.Prop.ReShadeConfigVersion)) From e8e56b966984027b2f69572368bc91d212094405 Mon Sep 17 00:00:00 2001 From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com> Date: Wed, 8 Mar 2023 17:16:41 +0000 Subject: [PATCH 4/5] Shader download configuration, 5.7.0 update check Made shader download behaviour more modular and configurable, and added a check for redownloading all shaders when upgrading to 5.7.0 --- Bloxstrap/Helpers/Integrations/ReShade.cs | 146 ++++++++++++++-------- Bloxstrap/Models/ReShadeShaderConfig.cs | 21 ++++ 2 files changed, 113 insertions(+), 54 deletions(-) create mode 100644 Bloxstrap/Models/ReShadeShaderConfig.cs diff --git a/Bloxstrap/Helpers/Integrations/ReShade.cs b/Bloxstrap/Helpers/Integrations/ReShade.cs index 7b64ae1..afc5355 100644 --- a/Bloxstrap/Helpers/Integrations/ReShade.cs +++ b/Bloxstrap/Helpers/Integrations/ReShade.cs @@ -1,5 +1,7 @@ using System; +using System.Collections; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.IO.Compression; @@ -35,39 +37,74 @@ namespace Bloxstrap.Helpers.Integrations // the base url that we're fetching all our remote configs and resources and stuff from private const string BaseUrl = "https://raw.githubusercontent.com/Extravi/extravi.github.io/main/update"; - // this is a list of selectable shaders to download: - // this should be formatted as { FolderName, GithubRepositoryUrl } - private static readonly IReadOnlyDictionary Shaders = new Dictionary() + // this is a list of selectable shaders to download + private static readonly List Shaders = new() { - { "Stock", "https://github.com/crosire/reshade-shaders/archive/refs/heads/master.zip" }, + new ReShadeShaderConfig { Name = "Stock", DownloadLocation = "https://github.com/crosire/reshade-shaders/archive/refs/heads/master.zip" }, // shaders required for extravi's presets: - { "Stormshade","https://github.com/cyrie/Stormshade/archive/refs/heads/master.zip" }, - { "Legacy", "https://github.com/crosire/reshade-shaders/archive/refs/heads/legacy.zip" }, - { "AlucardDH", "https://github.com/AlucardDH/dh-reshade-shaders/archive/refs/heads/master.zip" }, - { "AstrayFX", "https://github.com/BlueSkyDefender/AstrayFX/archive/refs/heads/master.zip" }, - { "Depth3D", "https://github.com/BlueSkyDefender/Depth3D/archive/refs/heads/master.zip" }, - { "Glamarye", "https://github.com/rj200/Glamarye_Fast_Effects_for_ReShade/archive/refs/heads/main.zip" }, - { "NiceGuy", "https://github.com/mj-ehsan/NiceGuy-Shaders/archive/refs/heads/main.zip" }, - { "prod80", "https://github.com/prod80/prod80-ReShade-Repository/archive/refs/heads/master.zip" }, - { "qUINT", "https://github.com/martymcmodding/qUINT/archive/refs/heads/master.zip" }, - { "SweetFX", "https://github.com/CeeJayDK/SweetFX/archive/refs/heads/master.zip" }, - { "Brussell", "https://github.com/brussell1/Shaders/archive/refs/heads/master.zip" }, - }; + new ReShadeShaderConfig { Name = "AstrayFX", DownloadLocation = "https://github.com/BlueSkyDefender/AstrayFX/archive/refs/heads/master.zip" }, + new ReShadeShaderConfig { Name = "Brussell", DownloadLocation = "https://github.com/brussell1/Shaders/archive/refs/heads/master.zip" }, + new ReShadeShaderConfig { Name = "Depth3D", DownloadLocation = "https://github.com/BlueSkyDefender/Depth3D/archive/refs/heads/master.zip" }, + new ReShadeShaderConfig { Name = "Glamarye", DownloadLocation = "https://github.com/rj200/Glamarye_Fast_Effects_for_ReShade/archive/refs/heads/main.zip" }, + new ReShadeShaderConfig { Name = "NiceGuy", DownloadLocation = "https://github.com/mj-ehsan/NiceGuy-Shaders/archive/refs/heads/main.zip" }, + new ReShadeShaderConfig { Name = "prod80", DownloadLocation = "https://github.com/prod80/prod80-ReShade-Repository/archive/refs/heads/master.zip" }, + new ReShadeShaderConfig { Name = "qUINT", DownloadLocation = "https://github.com/martymcmodding/qUINT/archive/refs/heads/master.zip" }, + new ReShadeShaderConfig { Name = "StockLegacy", DownloadLocation = "https://github.com/crosire/reshade-shaders/archive/refs/heads/legacy.zip" }, + new ReShadeShaderConfig { Name = "SweetFX", DownloadLocation = "https://github.com/CeeJayDK/SweetFX/archive/refs/heads/master.zip" }, + + // these ones needs some additional configuration + + new ReShadeShaderConfig + { + Name = "AlucardDH", + DownloadLocation = "https://github.com/AlucardDH/dh-reshade-shaders/archive/refs/heads/master.zip", + ExcludedFiles = new List() + { + // compiler error + "Shaders/dh_rtgi.fx" + } + }, + + new ReShadeShaderConfig + { + Name = "Stormshade", + DownloadLocation = "https://github.com/cyrie/Stormshade/archive/refs/heads/master.zip", + BaseFolder = "reshade-shaders/", + ExcludedFiles = new List() + { + // these file names conflict with effects in the stock reshade config + "Shaders/AmbientLight.fx", + "Shaders/Clarity.fx", + "Shaders/DOF.fx", + "Shaders/DPX.fx", + "Shaders/FilmGrain.fx", + "Shaders/FineSharp.fx", + "Shaders/FXAA.fx", + "Shaders/FXAA.fxh", + "Shaders/LumaSharpen.fx", + "Shaders/MXAO.fx", + "Shaders/ReShade.fxh", + "Shaders/Vibrance.fx", + "Shaders/Vignette.fx" + } + }, + }; private static readonly string[] ExtraviPresetsShaders = new string[] { - "Stormshade", - "Legacy", "AlucardDH", + "Brussell", "AstrayFX", - "Depth3D", + "Brussell", + "Depth3D", "Glamarye", "NiceGuy", "prod80", "qUINT", - "SweetFX", - "Brussell", + "StockLegacy", + "Stormshade", + "SweetFX", }; private static string GetSearchPath(string type, string name) @@ -179,7 +216,7 @@ namespace Bloxstrap.Helpers.Integrations public static async Task DownloadShaders(string name) { - string downloadUrl = Shaders.First(x => x.Key == name).Value; + ReShadeShaderConfig config = Shaders.First(x => x.Name == name); // not all shader packs have a textures folder, so here we're determining if they exist purely based on if they have a Shaders folder if (Directory.Exists(Path.Combine(ShadersFolder, name))) @@ -188,41 +225,25 @@ namespace Bloxstrap.Helpers.Integrations App.Logger.WriteLine($"[ReShade::DownloadShaders] Downloading shaders for {name}"); { - byte[] bytes = await App.HttpClient.GetByteArrayAsync(downloadUrl); + byte[] bytes = await App.HttpClient.GetByteArrayAsync(config.DownloadLocation); using MemoryStream zipStream = new(bytes); using ZipArchive archive = new(zipStream); foreach (ZipArchiveEntry entry in archive.Entries) { - if (entry.FullName.EndsWith('/')) + if (entry.FullName.EndsWith('/') || !entry.FullName.Contains(config.BaseFolder)) continue; - // github branch zips have a root folder of the name of the branch, so let's just remove that - string fullPath; - if (entry.FullName.Contains("Stormshade-master")) - { - fullPath = entry.FullName.Substring(entry.FullName.IndexOf("reshade-shaders/") + "reshade-shaders/".Length); - } - else - { - fullPath = entry.FullName.Substring(entry.FullName.IndexOf('/') + 1); - } + string fullPath = entry.FullName.Substring(entry.FullName.IndexOf(config.BaseFolder) + config.BaseFolder.Length); // skip file if it's not in the Shaders or Textures folder if (!fullPath.StartsWith("Shaders") && !fullPath.StartsWith("Textures")) continue; - // ingore shaders with compiler errors - if (fullPath.EndsWith("dh_Lain.fx") || fullPath.EndsWith("dh_rtgi.fx") || fullPath.EndsWith("DOF.fx") || fullPath.EndsWith("FXAA.fx") || fullPath.EndsWith("FXAA.fxh")) + if (config.ExcludedFiles.Contains(fullPath)) continue; - if (entry.FullName.Contains("Stormshade-master")) - { - if (fullPath.EndsWith("Clarity.fx") || fullPath.EndsWith("AmbientLight.fx")) - continue; - } - // and now we do it again because of how we're handling folder management // e.g. reshade-shaders-master/Shaders/Vignette.fx should go to ReShade/Shaders/Stock/Vignette.fx // so in this case, relativePath should just be "Vignette.fx" @@ -383,13 +404,6 @@ namespace Bloxstrap.Helpers.Integrations return; } - // initialize directories - Directory.CreateDirectory(BaseDirectory); - Directory.CreateDirectory(FontsFolder); - Directory.CreateDirectory(ShadersFolder); - Directory.CreateDirectory(TexturesFolder); - Directory.CreateDirectory(PresetsFolder); - // the version manfiest contains the version of reshade available for download and the last date the presets were updated var versionManifest = await Utilities.GetJson("https://raw.githubusercontent.com/Extravi/extravi.github.io/main/update/version.json"); bool shouldFetchReShade = false; @@ -406,19 +420,43 @@ namespace Bloxstrap.Helpers.Integrations if (injectorVersionInfo.ProductVersion != versionManifest.ReShade) shouldFetchReShade = true; + + // UPDATE CHECK - if we're upgrading to reshade 5.7.0, or we have extravi's presets + // enabled with a known shader downloaded (like AlucardDH) but without stormshade downloaded (5.7.0+ specific), + // we need to redownload all our shaders fresh + if ( + injectorVersionInfo.ProductVersion != versionManifest.ReShade && versionManifest.ReShade == "5.7.0" || + App.Settings.Prop.UseReShadeExtraviPresets && Directory.Exists(Path.Combine(ShadersFolder, "AlucardDH")) && !Directory.Exists(Path.Combine(ShadersFolder, "Stormshade")) + ) + { + Directory.Delete(ShadersFolder, true); + Directory.Delete(TexturesFolder, true); + App.State.Prop.ExtraviReShadePresetsVersion = ""; + } + } + else + { + App.Logger.WriteLine("[ReShade::CheckModifications] versionManifest is null!"); } - // check if we should download a fresh copy of the config - // extravi may need to update the config ota, in which case we'll redownload it - if (!File.Exists(ConfigLocation) || versionManifest is not null && App.State.Prop.ReShadeConfigVersion != versionManifest.ConfigFile) + // we're about to download - initialize directories + Directory.CreateDirectory(BaseDirectory); + Directory.CreateDirectory(FontsFolder); + Directory.CreateDirectory(ShadersFolder); + Directory.CreateDirectory(TexturesFolder); + Directory.CreateDirectory(PresetsFolder); + + // check if we should download a fresh copy of the config + // extravi may need to update the config ota, in which case we'll redownload it + if (!File.Exists(ConfigLocation) || versionManifest is not null && App.State.Prop.ReShadeConfigVersion != versionManifest.ConfigFile) shouldFetchConfig = true; if (shouldFetchReShade) { App.Logger.WriteLine("[ReShade::CheckModifications] Installing/Upgrading ReShade..."); - { - byte[] bytes = await App.HttpClient.GetByteArrayAsync($"{BaseUrl}/dxgi.zip"); + { + byte[] bytes = await App.HttpClient.GetByteArrayAsync($"{BaseUrl}/dxgi.zip"); using MemoryStream zipStream = new(bytes); using ZipArchive archive = new(zipStream); archive.ExtractToDirectory(Directories.Modifications, true); diff --git a/Bloxstrap/Models/ReShadeShaderConfig.cs b/Bloxstrap/Models/ReShadeShaderConfig.cs new file mode 100644 index 0000000..7993374 --- /dev/null +++ b/Bloxstrap/Models/ReShadeShaderConfig.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Bloxstrap.Models +{ + public class ReShadeShaderConfig + { + // it's assumed that the BaseFolder has a "Textures" folder and a "Shaders" folder + // the files listed in ExcludedFiles are relative to the BaseFolder + + public string Name { get; set; } = null!; + public string DownloadLocation { get; set; } = null!; + public string BaseFolder { get; set; } = "/"; + public List ExcludedFiles { get; set; } = new List(); + + public override string ToString() => Name; + } +} From 35a621ad29068cdfdba545602f32c134b1d58868 Mon Sep 17 00:00:00 2001 From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com> Date: Wed, 8 Mar 2023 17:35:22 +0000 Subject: [PATCH 5/5] Fix MXAO and fix whitespace Co-Authored-By: Extravi <98912029+Extravi@users.noreply.github.com> --- Bloxstrap/Helpers/Integrations/ReShade.cs | 57 ++++++++++++++--------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/Bloxstrap/Helpers/Integrations/ReShade.cs b/Bloxstrap/Helpers/Integrations/ReShade.cs index afc5355..b19c3f8 100644 --- a/Bloxstrap/Helpers/Integrations/ReShade.cs +++ b/Bloxstrap/Helpers/Integrations/ReShade.cs @@ -40,33 +40,44 @@ namespace Bloxstrap.Helpers.Integrations // this is a list of selectable shaders to download private static readonly List Shaders = new() { - new ReShadeShaderConfig { Name = "Stock", DownloadLocation = "https://github.com/crosire/reshade-shaders/archive/refs/heads/master.zip" }, - // shaders required for extravi's presets: new ReShadeShaderConfig { Name = "AstrayFX", DownloadLocation = "https://github.com/BlueSkyDefender/AstrayFX/archive/refs/heads/master.zip" }, new ReShadeShaderConfig { Name = "Brussell", DownloadLocation = "https://github.com/brussell1/Shaders/archive/refs/heads/master.zip" }, - new ReShadeShaderConfig { Name = "Depth3D", DownloadLocation = "https://github.com/BlueSkyDefender/Depth3D/archive/refs/heads/master.zip" }, + new ReShadeShaderConfig { Name = "Depth3D", DownloadLocation = "https://github.com/BlueSkyDefender/Depth3D/archive/refs/heads/master.zip" }, new ReShadeShaderConfig { Name = "Glamarye", DownloadLocation = "https://github.com/rj200/Glamarye_Fast_Effects_for_ReShade/archive/refs/heads/main.zip" }, new ReShadeShaderConfig { Name = "NiceGuy", DownloadLocation = "https://github.com/mj-ehsan/NiceGuy-Shaders/archive/refs/heads/main.zip" }, new ReShadeShaderConfig { Name = "prod80", DownloadLocation = "https://github.com/prod80/prod80-ReShade-Repository/archive/refs/heads/master.zip" }, new ReShadeShaderConfig { Name = "qUINT", DownloadLocation = "https://github.com/martymcmodding/qUINT/archive/refs/heads/master.zip" }, new ReShadeShaderConfig { Name = "StockLegacy", DownloadLocation = "https://github.com/crosire/reshade-shaders/archive/refs/heads/legacy.zip" }, - new ReShadeShaderConfig { Name = "SweetFX", DownloadLocation = "https://github.com/CeeJayDK/SweetFX/archive/refs/heads/master.zip" }, + new ReShadeShaderConfig { Name = "SweetFX", DownloadLocation = "https://github.com/CeeJayDK/SweetFX/archive/refs/heads/master.zip" }, // these ones needs some additional configuration + new ReShadeShaderConfig + { + Name = "Stock", + DownloadLocation = "https://github.com/crosire/reshade-shaders/archive/refs/heads/master.zip", + ExcludedFiles = new List() + { + // overriden by stormshade + "Shaders/MXAO.fx" + } + }, + new ReShadeShaderConfig { Name = "AlucardDH", DownloadLocation = "https://github.com/AlucardDH/dh-reshade-shaders/archive/refs/heads/master.zip", ExcludedFiles = new List() { - // compiler error - "Shaders/dh_rtgi.fx" + // compiler errors + // dh_Lain only errors when performance mode is disabled, but it's not used by any presets anyway + "Shaders/dh_rtgi.fx", + "Shaders/dh_Lain.fx" } }, - new ReShadeShaderConfig + new ReShadeShaderConfig { Name = "Stormshade", DownloadLocation = "https://github.com/cyrie/Stormshade/archive/refs/heads/master.zip", @@ -75,21 +86,21 @@ namespace Bloxstrap.Helpers.Integrations { // these file names conflict with effects in the stock reshade config "Shaders/AmbientLight.fx", - "Shaders/Clarity.fx", - "Shaders/DOF.fx", - "Shaders/DPX.fx", - "Shaders/FilmGrain.fx", - "Shaders/FineSharp.fx", - "Shaders/FXAA.fx", - "Shaders/FXAA.fxh", - "Shaders/LumaSharpen.fx", - "Shaders/MXAO.fx", - "Shaders/ReShade.fxh", - "Shaders/Vibrance.fx", - "Shaders/Vignette.fx" - } + "Shaders/Clarity.fx", + "Shaders/DOF.fx", + "Shaders/DPX.fx", + "Shaders/FilmGrain.fx", + "Shaders/FineSharp.fx", + "Shaders/FXAA.fx", + "Shaders/FXAA.fxh", + "Shaders/LumaSharpen.fx", + //"Shaders/MXAO.fx", + "Shaders/ReShade.fxh", + "Shaders/Vibrance.fx", + "Shaders/Vignette.fx" + } }, - }; + }; private static readonly string[] ExtraviPresetsShaders = new string[] { @@ -97,7 +108,7 @@ namespace Bloxstrap.Helpers.Integrations "Brussell", "AstrayFX", "Brussell", - "Depth3D", + "Depth3D", "Glamarye", "NiceGuy", "prod80", @@ -235,6 +246,7 @@ namespace Bloxstrap.Helpers.Integrations if (entry.FullName.EndsWith('/') || !entry.FullName.Contains(config.BaseFolder)) continue; + // github branch zips have a root folder of the name of the branch, so let's just remove that string fullPath = entry.FullName.Substring(entry.FullName.IndexOf(config.BaseFolder) + config.BaseFolder.Length); // skip file if it's not in the Shaders or Textures folder @@ -432,6 +444,7 @@ namespace Bloxstrap.Helpers.Integrations Directory.Delete(ShadersFolder, true); Directory.Delete(TexturesFolder, true); App.State.Prop.ExtraviReShadePresetsVersion = ""; + App.Logger.WriteLine("[ReShade::CheckModifications] Upgrading to ReShade 5.7.0 - redownloading all shaders!"); } } else